mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Use Duration.ZERO whenever possible
This commit is contained in:
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user