You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/10/19 17:21:30 UTC

[GitHub] [kafka] cmccabe commented on a change in pull request #11410: MINOR: Make TestUtils usable for KRaft mode

cmccabe commented on a change in pull request #11410:
URL: https://github.com/apache/kafka/pull/11410#discussion_r732087662



##########
File path: core/src/test/scala/unit/kafka/utils/TestUtils.scala
##########
@@ -1220,37 +1348,42 @@ object TestUtils extends Logging {
     }
   }
 
-
-  def verifyTopicDeletion(zkClient: KafkaZkClient, topic: String, numPartitions: Int, servers: Seq[KafkaServer]): Unit = {
+  def verifyTopicDeletion[B <: KafkaBroker](
+      zkClient: KafkaZkClient,
+      topic: String,
+      numPartitions: Int,
+      brokers: Seq[B]): Unit = {
     val topicPartitions = (0 until numPartitions).map(new TopicPartition(topic, _))
-    // wait until admin path for delete topic is deleted, signaling completion of topic deletion
-    waitUntilTrue(() => !zkClient.isTopicMarkedForDeletion(topic),
-      "Admin path /admin/delete_topics/%s path not deleted even after a replica is restarted".format(topic))
-    waitUntilTrue(() => !zkClient.topicExists(topic),
-      "Topic path /brokers/topics/%s not deleted after /admin/delete_topics/%s path is deleted".format(topic, topic))
+    if (zkClient != null) {

Review comment:
       It provides some additional information in the ZK case. For example, it might help diagnose a situation where the ZK controller never creates the znode under delete_topics.
   
   We can get rid of it eventually but I was trying to make a minimal change...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org