Suppress warnings
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user