From b469355d78a6bbff6d5291e0d085e535994ffa87 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Wed, 20 Sep 2023 11:14:51 -0500 Subject: [PATCH] Be patient, CI can be slow --- .../threads/ScheduledEnhancedQueueExecutorTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java b/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java index 71aa464..54d5320 100644 --- a/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java +++ b/src/test/java/org/jboss/threads/ScheduledEnhancedQueueExecutorTest.java @@ -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 @@ -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 @@ -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