TaiJuWu commented on code in PR #16627:
URL: https://github.com/apache/kafka/pull/16627#discussion_r1690631302


##########
core/src/test/java/kafka/test/ClusterInstance.java:
##########
@@ -183,6 +193,53 @@ default Set<GroupProtocol> supportedGroupProtocols() {
 
     //---------------------------[wait]---------------------------//
 
+    @SuppressWarnings("deprecation")
+    default void verifyTopicDeletion(String topic, int partitions) throws 
InterruptedException {

Review Comment:
   > Maybe we don't need this so complicated method. It can be implemented by 
`waitForTopic("xxx", 0)` WDYT?
   
   This is a good suggestion.
   I have same idea before, but this change make 
`testTopicWithCollidingCharDeletionAndCreateAgain` on `ZK mode`  failed at that 
moment.
   
   But this method can work at this moment, I still not sure the reason.
   Maybe I have these checking ?
   ```
   org.apache.kafka.test.TestUtils.waitForCondition(
                       () -> 
!clusterReference.get().zkClient().isTopicMarkedForDeletion(topic),
                       String.format("Admin path /admin/delete_topics/%s path 
not deleted even after a replica is restarted", topic)
               );
   
   org.apache.kafka.test.TestUtils.waitForCondition(
                     () -> 
!clusterReference.get().zkClient().topicExists(topic),
                     String.format("Topic path /brokers/topics/%s not deleted 
after /admin/delete_topics/%s path is deleted", topic, topic)
             );
   
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to