Resolve deprecations since the latest SF
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2016 the original author or authors.
|
||||
* Copyright 2013-2017 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.
|
||||
@@ -96,27 +96,27 @@ public class FileReadingMessageSourcePersistentFilterIntegrationTests {
|
||||
|
||||
@Test
|
||||
public void configured() throws Exception {
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(pollableFileSource);
|
||||
DirectFieldAccessor accessor = new DirectFieldAccessor(this.pollableFileSource);
|
||||
assertEquals(inputDir, accessor.getPropertyValue("directory"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getFiles() throws Exception {
|
||||
Message<File> received1 = pollableFileSource.receive();
|
||||
Message<File> received1 = this.pollableFileSource.receive();
|
||||
assertNotNull("This should return the first message", received1);
|
||||
Message<File> received2 = pollableFileSource.receive();
|
||||
Message<File> received2 = this.pollableFileSource.receive();
|
||||
assertNotNull(received2);
|
||||
Message<File> received3 = pollableFileSource.receive();
|
||||
Message<File> received3 = this.pollableFileSource.receive();
|
||||
assertNotNull(received3);
|
||||
assertNotSame(received1 + " == " + received2, received1.getPayload(), received2.getPayload());
|
||||
assertNotSame(received1 + " == " + received3, received1.getPayload(), received3.getPayload());
|
||||
assertNotSame(received2 + " == " + received3, received2.getPayload(), received3.getPayload());
|
||||
this.context.destroy();
|
||||
this.context.close();
|
||||
|
||||
this.loadContextAndGetMessageSource();
|
||||
Message<File> received4 = pollableFileSource.receive();
|
||||
loadContextAndGetMessageSource();
|
||||
Message<File> received4 = this.pollableFileSource.receive();
|
||||
assertNull(received4);
|
||||
this.context.destroy();
|
||||
this.context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
/**
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class DelayerHandlerRescheduleIntegrationTests {
|
||||
@@ -100,7 +101,7 @@ public class DelayerHandlerRescheduleIntegrationTests {
|
||||
(ThreadPoolTaskScheduler) IntegrationContextUtils.getTaskScheduler(context);
|
||||
taskScheduler.shutdown();
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10, TimeUnit.SECONDS);
|
||||
context.destroy();
|
||||
context.close();
|
||||
|
||||
try {
|
||||
context.getBean("input", MessageChannel.class);
|
||||
@@ -144,7 +145,7 @@ public class DelayerHandlerRescheduleIntegrationTests {
|
||||
}
|
||||
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
|
||||
context.destroy();
|
||||
context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class DelayerHandlerRescheduleIntegrationTests {
|
||||
(ThreadPoolTaskScheduler) IntegrationContextUtils.getTaskScheduler(context);
|
||||
taskScheduler.shutdown();
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10, TimeUnit.SECONDS);
|
||||
context.destroy();
|
||||
context.close();
|
||||
|
||||
try {
|
||||
context.getBean("input", MessageChannel.class);
|
||||
@@ -143,7 +143,7 @@ public class DelayerHandlerRescheduleIntegrationTests {
|
||||
|
||||
assertEquals(1, messageStore.getMessageGroupCount());
|
||||
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
context.destroy();
|
||||
context.close();
|
||||
}
|
||||
|
||||
@Test //INT-2649
|
||||
@@ -163,7 +163,7 @@ public class DelayerHandlerRescheduleIntegrationTests {
|
||||
assertEquals(1, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
|
||||
//To check that 'rescheduling' works in the transaction boundaries too
|
||||
context.destroy();
|
||||
context.close();
|
||||
context.refresh();
|
||||
|
||||
assertTrue(RollbackTxSync.latch.await(20, TimeUnit.SECONDS));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -36,6 +36,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
/**
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.2
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@@ -65,7 +66,7 @@ public class StoredProcOutboundChannelAdapterWithinChainTests {
|
||||
assertEquals("Wrong email", "email", map.get("EMAIL"));
|
||||
// embeddedDatabase can be in working state. So other tests with the same embeddedDatabase beanId, type and init scripts
|
||||
// may be failed with Exception like: object in the DB already exists
|
||||
this.context.destroy();
|
||||
this.context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
|
||||
/**
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTests {
|
||||
@@ -104,7 +105,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
|
||||
.getOriginal();
|
||||
assertThat(message1, Matchers.anyOf(Matchers.is(original1), Matchers.is(original2)));
|
||||
|
||||
context.destroy();
|
||||
context.close();
|
||||
|
||||
context.refresh();
|
||||
|
||||
@@ -123,7 +124,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends MongoDbAvailableTe
|
||||
messageStore = context.getBean("messageStore", MessageGroupStore.class);
|
||||
|
||||
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
context.destroy();
|
||||
context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
/**
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTests {
|
||||
@@ -83,7 +84,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
|
||||
(ThreadPoolTaskScheduler) IntegrationContextUtils.getTaskScheduler(context);
|
||||
taskScheduler.shutdown();
|
||||
taskScheduler.getScheduledExecutor().awaitTermination(10, TimeUnit.SECONDS);
|
||||
context.destroy();
|
||||
context.close();
|
||||
|
||||
try {
|
||||
context.getBean("input", MessageChannel.class);
|
||||
@@ -128,7 +129,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
|
||||
assertEquals(0, messageStore.messageGroupSize(delayerMessageGroupId));
|
||||
|
||||
messageStore.removeMessageGroup(delayerMessageGroupId);
|
||||
context.destroy();
|
||||
context.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user