This is an automated email from the ASF dual-hosted git repository.

jolshan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b77b7a6f6f6 MINOR: Deflake some tests in TopicCommandIntegrationTest 
(#13479)
b77b7a6f6f6 is described below

commit b77b7a6f6f6d39f8064fc5fb11f25b09c58c4228
Author: andymg3 <[email protected]>
AuthorDate: Thu Mar 30 18:25:15 2023 -0400

    MINOR: Deflake some tests in TopicCommandIntegrationTest (#13479)
    
    A couple tests in TopicCommandIntegrationTest look flaky, such as 
testTopicDeletion and testTopicWithCollidingCharDeletionAndCreateAgain.
    
    I also updated part of a comment that implies the code only runs in ZK mode 
but thats not the case so I removed it.
    
    Reviewers: Colin P. McCabe <[email protected]>, Justine Olshan 
<[email protected]>
---
 core/src/test/scala/unit/kafka/utils/TestUtils.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/test/scala/unit/kafka/utils/TestUtils.scala 
b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
index e0b65b90cff..a499ac38344 100755
--- a/core/src/test/scala/unit/kafka/utils/TestUtils.scala
+++ b/core/src/test/scala/unit/kafka/utils/TestUtils.scala
@@ -1513,8 +1513,8 @@ object TestUtils extends Logging {
     waitUntilTrue(() =>
       brokers.forall(broker => topicPartitions.forall(tp => 
broker.replicaManager.onlinePartition(tp).isEmpty)),
       "Replica manager's should have deleted all of this topic's partitions")
-    // ensure that logs from all replicas are deleted if delete topic is 
marked successful in ZooKeeper
-    assertTrue(brokers.forall(broker => topicPartitions.forall(tp => 
broker.logManager.getLog(tp).isEmpty)),
+    // ensure that logs from all replicas are deleted
+    waitUntilTrue(() => brokers.forall(broker => topicPartitions.forall(tp => 
broker.logManager.getLog(tp).isEmpty)),
       "Replica logs not deleted after delete topic is complete")
     // ensure that topic is removed from all cleaner offsets
     waitUntilTrue(() => brokers.forall(broker => topicPartitions.forall { tp =>

Reply via email to