Shutdown test executors in -core

- don't use `ExecutorService` as `@Bean` - spring can't stop them
- also add log adjuster for ftp test that sometimes fails
This commit is contained in:
Gary Russell
2018-01-18 17:37:17 -05:00
committed by Artem Bilan
parent d890f14c5d
commit 8aa91d1db0
20 changed files with 137 additions and 62 deletions

View File

@@ -26,6 +26,7 @@ import java.io.InputStream;
import java.util.Comparator;
import org.apache.commons.net.ftp.FTPFile;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -46,6 +47,7 @@ import org.springframework.integration.ftp.FtpTestSupport;
import org.springframework.integration.ftp.session.FtpFileInfo;
import org.springframework.integration.ftp.session.FtpRemoteFileTemplate;
import org.springframework.integration.scheduling.PollerMetadata;
import org.springframework.integration.test.rule.Log4j2LevelAdjuster;
import org.springframework.integration.transformer.StreamTransformer;
import org.springframework.messaging.Message;
import org.springframework.scheduling.support.PeriodicTrigger;
@@ -71,6 +73,10 @@ public class FtpStreamingMessageSourceTests extends FtpTestSupport {
@Autowired
private SourcePollingChannelAdapter adapter;
@Rule
public Log4j2LevelAdjuster adjuster = Log4j2LevelAdjuster.debug()
.categories("org.springframework.integration", "org.apache.commons");
@SuppressWarnings("unchecked")
@Test
public void testAllContents() {