MCPcopy
hub / github.com/IBM/sarama / TestFuncAdminDeleteTopic

Function TestFuncAdminDeleteTopic

functional_admin_test.go:816–837  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

814}
815
816func TestFuncAdminDeleteTopic(t *testing.T) {
817 t.Parallel()
818 checkKafkaVersion(t, "0.10.0.0")
819 setupFunctionalTest(t)
820 defer teardownFunctionalTest(t)
821
822 config := NewFunctionalTestConfig()
823 adminClient, err := NewClusterAdmin(FunctionalTestEnv.KafkaBrokerAddrs, config)
824 if err != nil {
825 t.Fatal(err)
826 }
827 defer safeClose(t, adminClient)
828
829 err = adminClient.CreateTopic("delete_topic_test", &TopicDetail{NumPartitions: 1, ReplicationFactor: 1}, false)
830 if err != nil {
831 t.Fatal(err)
832 }
833 err = adminClient.DeleteTopic("delete_topic_test")
834 if err != nil {
835 t.Fatal(err)
836 }
837}
838
839// TestFuncAdminElectLeadersV1 covers low-version client compatibility against a
840// newer broker for the ElectLeaders V1 non-flexible path. See

Callers

nothing calls this directly

Calls 9

CreateTopicMethod · 0.95
DeleteTopicMethod · 0.95
checkKafkaVersionFunction · 0.85
setupFunctionalTestFunction · 0.85
teardownFunctionalTestFunction · 0.85
NewFunctionalTestConfigFunction · 0.85
NewClusterAdminFunction · 0.85
FatalMethod · 0.80
safeCloseFunction · 0.70

Tested by

no test coverage detected