eolivelli commented on issue #751: create assertEventuallyEquals for unit test, and do the clean up URL: https://github.com/apache/bookkeeper/issues/751#issuecomment-345990781 @zhaijack @sijie @ivankelly usually I have a "waitForCondition" method in tests like ``` public static void waitForCondition(Callable<Boolean> test, long maxMillis){ while (maxMillis > 0) { if (test.call()){ return; } maxMillis -= 10; Thread.sleep(10); } fail("condition not me in time"); } ``` and something like: ``` public static void waitForCondition(Callable<Boolean> test, long maxMillis, Runnable spinner){ while (maxMillis > 0) { if (test.call()){ return; } spinner.run(); maxMillis -= 10; Thread.sleep(10); } fail("condition not me in time"); } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
