KAFKA-8232; Test topic delete completion rather than intermediate state (#6581)

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
This commit is contained in:
Rajini Sivaram 2019-04-15 12:42:23 +01:00 committed by GitHub
parent 312e55bf56
commit 51a67d52cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -468,7 +468,7 @@ class TopicCommandWithAdminClientTest extends KafkaServerTestHarness with Loggin
val deletePath = DeleteTopicsTopicZNode.path(testTopicName) val deletePath = DeleteTopicsTopicZNode.path(testTopicName)
assertFalse("Delete path for topic shouldn't exist before deletion.", zkClient.pathExists(deletePath)) assertFalse("Delete path for topic shouldn't exist before deletion.", zkClient.pathExists(deletePath))
topicService.deleteTopic(deleteOpts) topicService.deleteTopic(deleteOpts)
assertTrue("Delete path for topic should exist after deletion.", zkClient.pathExists(deletePath)) TestUtils.verifyTopicDeletion(zkClient, testTopicName, 1, servers)
} }
@Test @Test
@ -486,7 +486,7 @@ class TopicCommandWithAdminClientTest extends KafkaServerTestHarness with Loggin
val deleteOffsetTopicPath = DeleteTopicsTopicZNode.path(Topic.GROUP_METADATA_TOPIC_NAME) val deleteOffsetTopicPath = DeleteTopicsTopicZNode.path(Topic.GROUP_METADATA_TOPIC_NAME)
assertFalse("Delete path for topic shouldn't exist before deletion.", zkClient.pathExists(deleteOffsetTopicPath)) assertFalse("Delete path for topic shouldn't exist before deletion.", zkClient.pathExists(deleteOffsetTopicPath))
topicService.deleteTopic(deleteOffsetTopicOpts) 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 @Test