ctubbsii commented on code in PR #3508:
URL: https://github.com/apache/accumulo/pull/3508#discussion_r1240325463


##########
test/src/main/java/org/apache/accumulo/test/util/Wait.java:
##########
@@ -48,4 +50,13 @@ public static boolean waitFor(final Condition condition, 
final long duration,
     }
     return conditionSatisfied;
   }
+
+  /**
+   * A retry for use in junit tests when testing asynchronous conditions that 
are expected to
+   * eventually meet the condition or fail the test. Using this method should 
be used instead of an
+   * arbitrary sleep and hoping to catch the condition in the expected state.
+   */
+  public static void assertTrueWithRetry(final Wait.Condition condition) 
throws Exception {
+    assertTrue(waitFor(condition));
+  }

Review Comment:
   FWIW, that change can be done in a separate PR. For this PR, I think you 
should just use the existing methods, `assertTrue(waitFor(x));` to wrap this up.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to