(t *testing.T, conn *Conn)
| 1027 | } |
| 1028 | |
| 1029 | func testDeleteTopics(t *testing.T, conn *Conn) { |
| 1030 | topic1 := makeTopic() |
| 1031 | topic2 := makeTopic() |
| 1032 | err := conn.CreateTopics( |
| 1033 | TopicConfig{ |
| 1034 | Topic: topic1, |
| 1035 | NumPartitions: 1, |
| 1036 | ReplicationFactor: 1, |
| 1037 | }, |
| 1038 | TopicConfig{ |
| 1039 | Topic: topic2, |
| 1040 | NumPartitions: 1, |
| 1041 | ReplicationFactor: 1, |
| 1042 | }, |
| 1043 | ) |
| 1044 | if err != nil { |
| 1045 | t.Fatalf("bad CreateTopics: %v", err) |
| 1046 | } |
| 1047 | conn.SetDeadline(time.Now().Add(time.Second)) |
| 1048 | err = conn.DeleteTopics(topic1, topic2) |
| 1049 | if err != nil { |
| 1050 | t.Fatalf("bad DeleteTopics: %v", err) |
| 1051 | } |
| 1052 | partitions, err := conn.ReadPartitions(topic1, topic2) |
| 1053 | if err != nil { |
| 1054 | t.Fatalf("bad ReadPartitions: %v", err) |
| 1055 | } |
| 1056 | if len(partitions) != 0 { |
| 1057 | t.Fatal("exepected partitions to be empty ") |
| 1058 | } |
| 1059 | } |
| 1060 | |
| 1061 | func testDeleteTopicsInvalidTopic(t *testing.T, conn *Conn) { |
| 1062 | topic := makeTopic() |
nothing calls this directly
no test coverage detected
searching dependent graphs…