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

davidarthur pushed a commit to branch deflake-testFenceMultipleBrokers
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to 
refs/heads/deflake-testFenceMultipleBrokers by this push:
     new 1bea8175ca2 add logging, increase repeat
1bea8175ca2 is described below

commit 1bea8175ca215da3bc33db95cad0a24dcf7a2e5a
Author: David Arthur <mum...@gmail.com>
AuthorDate: Tue Sep 10 10:54:57 2024 -0400

    add logging, increase repeat
---
 .../kafka/controller/QuorumControllerIntegrationTestUtils.java      | 2 +-
 .../test/java/org/apache/kafka/controller/QuorumControllerTest.java | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerIntegrationTestUtils.java
 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerIntegrationTestUtils.java
index a8331fe9f23..efc10dd651e 100644
--- 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerIntegrationTestUtils.java
+++ 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerIntegrationTestUtils.java
@@ -146,7 +146,7 @@ public class QuorumControllerIntegrationTestUtils {
                     .setBrokerEpoch(brokerEpochs.get(brokerId))
                     .setBrokerId(brokerId)
                     .setCurrentMetadataOffset(100000)
-            ).get();
+            ).get(30, TimeUnit.SECONDS);
             assertEquals(new BrokerHeartbeatReply(true, false, false, false), 
reply);
         }
     }
diff --git 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java
index 3b39539547e..5e941f8156e 100644
--- 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java
+++ 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java
@@ -263,7 +263,7 @@ public class QuorumControllerTest {
         assertEquals(Collections.singletonMap(BROKER0, ApiError.NONE), 
future1.get());
     }
 
-    @RepeatedTest(100)
+    @RepeatedTest(400)
     public void testFenceMultipleBrokers() throws Throwable {
         List<Integer> allBrokers = Arrays.asList(1, 2, 3, 4, 5);
         List<Integer> brokersToKeepUnfenced = Arrays.asList(1);
@@ -315,10 +315,12 @@ public class QuorumControllerTest {
             Uuid topicIdFoo = 
createTopicsResponseData.topics().find("foo").topicId();
 
             // Fence some of the brokers
+            log.debug("Waiting for brokers to be fenced");
             TestUtils.waitForCondition(() -> {
                     sendBrokerHeartbeatToUnfenceBrokers(active, 
brokersToKeepUnfenced, brokerEpochs);
                     for (Integer brokerId : brokersToFence) {
                         if (active.clusterControl().isUnfenced(brokerId)) {
+                            log.debug("Broker {} is still unfenced", brokerId);
                             return false;
                         }
                     }
@@ -326,6 +328,8 @@ public class QuorumControllerTest {
                 }, sessionTimeoutMillis * 3,
                 "Fencing of brokers did not process within expected time"
             );
+            log.debug("Finished waiting for brokers to be fenced");
+
 
             // Send another heartbeat to the brokers we want to keep alive
             sendBrokerHeartbeatToUnfenceBrokers(active, brokersToKeepUnfenced, 
brokerEpochs);

Reply via email to