chia7712 commented on a change in pull request #10323: URL: https://github.com/apache/kafka/pull/10323#discussion_r594972521
########## File path: raft/src/test/java/org/apache/kafka/raft/RaftEventSimulationTest.java ########## @@ -525,33 +430,27 @@ void schedule(Runnable action, int delayMs, int periodMs, int jitterMs) { } void runUntil(Supplier<Boolean> exitCondition) { - while (!exitCondition.get()) { - if (queue.isEmpty()) + for (int iteration = 0; iteration < MAX_ITERATIONS; iteration++) { Review comment: How about setting `@Timeout` instead of `MAX_ITERATIONS`? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org