Skip to content

Commit

Permalink
Tweak ManagedScheduledExecutorServiceTest timing (which is often caus…
Browse files Browse the repository at this point in the history
…ing CI failures)

The bad feeling remains that I only fixed 1 of 30 ugly timings :/
  • Loading branch information
rzo1 committed Apr 22, 2024
1 parent ee2616f commit 1d0d439
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ public boolean skipRun(final LastExecution lastExecutionInfo, final Date schedul
assertFalse(future.isCancelled());

//Should easily get 5 invocations within 1 second
counter.await(3, TimeUnit.SECONDS);
counter.await(5, TimeUnit.SECONDS);

future.cancel(true);
assertEquals("Counter did not count down in time", 0L, counter.getCount());

final boolean done = future.isDone();
assertTrue(done);
assertTrue("Future should be done", done);
final boolean cancelled = future.isCancelled();
assertTrue(cancelled);
assertTrue("Future should be cancelled", cancelled);
}

@Test
Expand Down

0 comments on commit 1d0d439

Please sign in to comment.