From 51a67d52cbd9aee0b0dacd33cca5f39322aae4ef Mon Sep 17 00:00:00 2001 From: Rajini Sivaram Date: Mon, 15 Apr 2019 12:42:23 +0100 Subject: [PATCH] KAFKA-8232; Test topic delete completion rather than intermediate state (#6581) Reviewers: Manikumar Reddy --- .../unit/kafka/admin/TopicCommandWithAdminClientTest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/scala/unit/kafka/admin/TopicCommandWithAdminClientTest.scala b/core/src/test/scala/unit/kafka/admin/TopicCommandWithAdminClientTest.scala index d1eac2d019d..bc0eadfb1e1 100644 --- a/core/src/test/scala/unit/kafka/admin/TopicCommandWithAdminClientTest.scala +++ b/core/src/test/scala/unit/kafka/admin/TopicCommandWithAdminClientTest.scala @@ -468,7 +468,7 @@ class TopicCommandWithAdminClientTest extends KafkaServerTestHarness with Loggin val deletePath = DeleteTopicsTopicZNode.path(testTopicName) assertFalse("Delete path for topic shouldn't exist before deletion.", zkClient.pathExists(deletePath)) topicService.deleteTopic(deleteOpts) - assertTrue("Delete path for topic should exist after deletion.", zkClient.pathExists(deletePath)) + TestUtils.verifyTopicDeletion(zkClient, testTopicName, 1, servers) } @Test @@ -486,7 +486,7 @@ class TopicCommandWithAdminClientTest extends KafkaServerTestHarness with Loggin val deleteOffsetTopicPath = DeleteTopicsTopicZNode.path(Topic.GROUP_METADATA_TOPIC_NAME) assertFalse("Delete path for topic shouldn't exist before deletion.", zkClient.pathExists(deleteOffsetTopicPath)) topicService.deleteTopic(deleteOffsetTopicOpts) - assertTrue("Delete path for topic should exist after deletion.", zkClient.pathExists(deleteOffsetTopicPath)) + TestUtils.verifyTopicDeletion(zkClient, Topic.GROUP_METADATA_TOPIC_NAME, 1, servers) } @Test