DomGarguilo commented on a change in pull request #1816:
URL: https://github.com/apache/accumulo/pull/1816#discussion_r532920000
##########
File path:
server/base/src/test/java/org/apache/accumulo/server/util/time/SimpleTimerTest.java
##########
@@ -70,35 +69,50 @@ public void run() {
}
}
- @Test
+ @Test(timeout = 5000)
public void testOneTimeSchedule() throws InterruptedException {
AtomicInteger i = new AtomicInteger();
Incrementer r = new Incrementer(i);
t.schedule(r, DELAY);
Thread.sleep(DELAY + PAD);
- assertEquals(1, i.get());
+ while (true) {
+ if (i.get() == 1) {
+ break;
+ }
+ Thread.sleep(PAD);
+ }
Review comment:
Was considering that as well. I will add this change.
----------------------------------------------------------------
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:
[email protected]