Skip to content

Commit

Permalink
Be patient, CI can be slow
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Sep 20, 2023
1 parent 861ba04 commit b469355
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ public void testFixedRateExecution() throws Exception {
completeLatch.countDown();
}
}, 20, 50, TimeUnit.MILLISECONDS);
assertTrue(completeLatch.await(1, TimeUnit.SECONDS), "Completion of enough iterations");
assertTrue(completeLatch.await(5, TimeUnit.SECONDS), "Completion of enough iterations");
assertFalse(future.isDone()); // they're never done
// don't assert, because there's a small chance it would happen to be running
future.cancel(false);
try {
future.get(1, TimeUnit.SECONDS);
future.get(5, TimeUnit.SECONDS);
fail("Expected cancellation exception");
} catch (CancellationException e) {
// expected
Expand All @@ -129,12 +129,12 @@ public void testFixedDelayExecution() throws Exception {
completeLatch.countDown();
}
}, 20, 50, TimeUnit.MILLISECONDS);
assertTrue(completeLatch.await(1, TimeUnit.SECONDS), "Completion of enough iterations");
assertTrue(completeLatch.await(5, TimeUnit.SECONDS), "Completion of enough iterations");
assertFalse(future.isDone()); // they're never done
// don't assert, because there's a small chance it would happen to be running
future.cancel(false);
try {
future.get(1, TimeUnit.SECONDS);
future.get(5, TimeUnit.SECONDS);
fail("Expected cancellation exception");
} catch (CancellationException e) {
// expected
Expand All @@ -154,7 +154,7 @@ public void testCancelOnShutdown() throws Exception {
eqe.shutdown();
assertTrue(eqe.awaitTermination(5, TimeUnit.SECONDS), "Timely shutdown");
try {
future.get(1, TimeUnit.SECONDS);
future.get(5, TimeUnit.SECONDS);
fail("Expected cancellation exception");
} catch (CancellationException e) {
// expected
Expand Down

0 comments on commit b469355

Please sign in to comment.