Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be patient, CI can be slow #134

Merged
merged 1 commit into from
Sep 20, 2023
Merged
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 @@ -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
Loading