FrankYang0529 commented on code in PR #19262:
URL: https://github.com/apache/kafka/pull/19262#discussion_r2012174856


##########
metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java:
##########
@@ -654,6 +658,19 @@ public void testMinIsrUpdateWithElr() throws Throwable {
 
             // Unfence all brokers and create a topic foo (min ISR 2)
             sendBrokerHeartbeatToUnfenceBrokers(active, allBrokers, 
brokerEpochs);
+            AtomicBoolean onlyKeepUnfenced = new AtomicBoolean(false);
+            exec.scheduleAtFixedRate(() -> {

Review Comment:
   Yes, it's timing issue. As the example in PR description, the flaky test is 
because broker 1 got fenced before it sends another heartbeat request to 
prevent session timeout. I use another thread to do this every 100 milliseconds 
to make brokers to stay in expected state.



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to