Skip to content

Commit

Permalink
Test with 5 seconds
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Sep 5, 2024
1 parent 375dda3 commit 7fa5cc5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,7 @@ public static void assertBusy(CheckedRunnable<Exception> codeBlock) throws Excep
* Runs the code block for the provided interval, waiting for no assertions to trip.
*/
public static void assertBusy(CheckedRunnable<Exception> codeBlock, long maxWaitTime, TimeUnit unit) throws Exception {
maxWaitTime = 5;
long maxTimeInMillis = TimeUnit.MILLISECONDS.convert(maxWaitTime, unit);
// In case you've forgotten your high-school studies, log10(x) / log10(y) == log y(x)
long iterations = Math.max(Math.round(Math.log10(maxTimeInMillis) / Math.log10(2)), 1);
Expand Down

0 comments on commit 7fa5cc5

Please sign in to comment.