diff --git a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java index 7109ffea52..c86ca0f22a 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java @@ -88,6 +88,7 @@ public class ThreadPoolTaskSchedulerTests extends AbstractSchedulingTaskExecutor } @Test + @SuppressWarnings("deprecation") void scheduleOneTimeTask() throws Exception { TestTask task = new TestTask(this.testName, 1); Future future = scheduler.schedule(task, new Date()); @@ -98,6 +99,7 @@ public class ThreadPoolTaskSchedulerTests extends AbstractSchedulingTaskExecutor } @Test + @SuppressWarnings("deprecation") void scheduleOneTimeFailingTaskWithoutErrorHandler() throws Exception { TestTask task = new TestTask(this.testName, 0); Future future = scheduler.schedule(task, new Date()); @@ -106,6 +108,7 @@ public class ThreadPoolTaskSchedulerTests extends AbstractSchedulingTaskExecutor } @Test + @SuppressWarnings("deprecation") void scheduleOneTimeFailingTaskWithErrorHandler() throws Exception { TestTask task = new TestTask(this.testName, 0); TestErrorHandler errorHandler = new TestErrorHandler(1); diff --git a/spring-context/src/test/java/org/springframework/scheduling/support/CronTriggerTests.java b/spring-context/src/test/java/org/springframework/scheduling/support/CronTriggerTests.java index df7fc852b8..d1f58624c4 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/support/CronTriggerTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/support/CronTriggerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,7 @@ import static org.junit.jupiter.params.provider.Arguments.arguments; * @author Juergen Hoeller * @author Sam Brannen */ +@SuppressWarnings("deprecation") class CronTriggerTests { private final Calendar calendar = new GregorianCalendar(); diff --git a/spring-context/src/test/java/org/springframework/scheduling/support/PeriodicTriggerTests.java b/spring-context/src/test/java/org/springframework/scheduling/support/PeriodicTriggerTests.java index ba466774a6..293d943136 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/support/PeriodicTriggerTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/support/PeriodicTriggerTests.java @@ -44,6 +44,7 @@ public class PeriodicTriggerTests { @Test public void fixedDelayWithInitialDelayFirstExecution() { + @SuppressWarnings("deprecation") Instant now = Instant.now(); long period = 5000; long initialDelay = 30000; @@ -83,6 +84,7 @@ public class PeriodicTriggerTests { @Test public void fixedDelayWithInitialDelaySubsequentExecution() { + @SuppressWarnings("deprecation") Instant now = Instant.now(); long period = 5000; long initialDelay = 30000; @@ -121,6 +123,7 @@ public class PeriodicTriggerTests { @Test public void fixedRateWithInitialDelayFirstExecution() { + @SuppressWarnings("deprecation") Instant now = Instant.now(); long period = 5000; long initialDelay = 30000; @@ -155,6 +158,7 @@ public class PeriodicTriggerTests { @Test public void fixedRateWithInitialDelaySubsequentExecution() { + @SuppressWarnings("deprecation") Instant now = Instant.now(); long period = 5000; long initialDelay = 30000; @@ -177,6 +181,7 @@ public class PeriodicTriggerTests { @Test public void equalsVerification() { + @SuppressWarnings("deprecation") PeriodicTrigger trigger1 = new PeriodicTrigger(Duration.ofMillis(3000)); PeriodicTrigger trigger2 = new PeriodicTrigger(Duration.ofMillis(3000)); assertThat(trigger1.equals(new String("not a trigger"))).isFalse();