Use Duration.ZERO whenever possible

This commit is contained in:
Sam Brannen
2025-07-03 16:55:09 +02:00
parent 58061ae295
commit c6a8df4a9d
8 changed files with 13 additions and 13 deletions
@@ -90,7 +90,7 @@ class ScheduledTaskTests {
@Test
void singleExecutionShouldNotHaveNextExecution() {
ScheduledTask scheduledTask = taskRegistrar.scheduleOneTimeTask(new OneTimeTask(countingRunnable, Duration.ofSeconds(0)));
ScheduledTask scheduledTask = taskRegistrar.scheduleOneTimeTask(new OneTimeTask(countingRunnable, Duration.ZERO));
Awaitility.await().atMost(Duration.ofSeconds(5)).until(() -> countingRunnable.executionCount > 0);
assertThat(scheduledTask.nextExecution()).isNull();
}