You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/16 09:00:14 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #10323: KAFKA-12459; Use property testing library for raft event simulation tests

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:
users@infra.apache.org