Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ public TimeValue timeout() {
submitTask("unblock-task", unblockTask);

block.countDown();
block2.await();
blockCompleted.await();
assertTrue(block2.await(10, TimeUnit.SECONDS));
assertTrue(blockCompleted.await(10, TimeUnit.SECONDS));
}

public void testTimeoutTask() throws Exception {
Expand Down Expand Up @@ -257,7 +257,7 @@ public void onFailure(String source, Exception e) {
};
submitTask("block-task", test2);

timedOut.await();
assertTrue(timedOut.await(10, TimeUnit.SECONDS));
block.countDown();
final CountDownLatch allProcessed = new CountDownLatch(1);
TestTask test3 = new TestTask() {
Expand All @@ -273,7 +273,7 @@ public void onFailure(String source, Exception e) {
}
};
submitTask("block-task", test3);
allProcessed.await(); // executed another task to double check that execute on the timed out update task is not called...
assertTrue(allProcessed.await(10, TimeUnit.SECONDS)); // executed another task to double check that execute on the timed out update task is not called...
assertThat(executeCalled.get(), equalTo(false));
}

Expand Down Expand Up @@ -304,7 +304,7 @@ public void testPrioritizedTasks() throws Exception {
}

block.close();
latch.await();
assertTrue(latch.await(10, TimeUnit.SECONDS));

Priority prevPriority = null;
for (PrioritizedTask task : tasks) {
Expand Down
Loading