(t *testing.T, conn *Conn)
| 1059 | } |
| 1060 | |
| 1061 | func testDeleteTopicsInvalidTopic(t *testing.T, conn *Conn) { |
| 1062 | topic := makeTopic() |
| 1063 | err := conn.CreateTopics( |
| 1064 | TopicConfig{ |
| 1065 | Topic: topic, |
| 1066 | NumPartitions: 1, |
| 1067 | ReplicationFactor: 1, |
| 1068 | }, |
| 1069 | ) |
| 1070 | if err != nil { |
| 1071 | t.Fatalf("bad CreateTopics: %v", err) |
| 1072 | } |
| 1073 | conn.SetDeadline(time.Now().Add(5 * time.Second)) |
| 1074 | err = conn.DeleteTopics("invalid-topic", topic) |
| 1075 | if !errors.Is(err, UnknownTopicOrPartition) { |
| 1076 | t.Fatalf("expected UnknownTopicOrPartition error, but got %v", err) |
| 1077 | } |
| 1078 | partitions, err := conn.ReadPartitions(topic) |
| 1079 | if err != nil { |
| 1080 | t.Fatalf("bad ReadPartitions: %v", err) |
| 1081 | } |
| 1082 | if len(partitions) != 0 { |
| 1083 | t.Fatal("expected partitions to be empty") |
| 1084 | } |
| 1085 | } |
| 1086 | |
| 1087 | func testController(t *testing.T, conn *Conn) { |
| 1088 | b, err := conn.Controller() |
nothing calls this directly
no test coverage detected