diff --git a/spring-integration-adapters/src/test/java/org/springframework/integration/adapter/stream/ByteStreamSourceAdapterTests.java b/spring-integration-adapters/src/test/java/org/springframework/integration/adapter/stream/ByteStreamSourceAdapterTests.java index 46cf2ef0b4..f9c9c6d2b1 100644 --- a/spring-integration-adapters/src/test/java/org/springframework/integration/adapter/stream/ByteStreamSourceAdapterTests.java +++ b/spring-integration-adapters/src/test/java/org/springframework/integration/adapter/stream/ByteStreamSourceAdapterTests.java @@ -39,6 +39,7 @@ public class ByteStreamSourceAdapterTests { MessageChannel channel = new SimpleChannel(); ByteStreamSourceAdapter adapter = new ByteStreamSourceAdapter(stream); adapter.setChannel(channel); + adapter.setInitialDelay(10000); adapter.start(); int count = adapter.processMessages(); assertEquals(1, count); @@ -62,6 +63,7 @@ public class ByteStreamSourceAdapterTests { MessageChannel channel = new SimpleChannel(); ByteStreamSourceAdapter adapter = new ByteStreamSourceAdapter(stream); adapter.setChannel(channel); + adapter.setInitialDelay(10000); adapter.setBytesPerMessage(8); adapter.setMaxMessagesPerTask(5); adapter.start(); diff --git a/spring-integration-core/src/main/java/org/springframework/integration/adapter/PollingSourceAdapter.java b/spring-integration-core/src/main/java/org/springframework/integration/adapter/PollingSourceAdapter.java index a070bc7af1..40312a17ec 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/adapter/PollingSourceAdapter.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/adapter/PollingSourceAdapter.java @@ -121,13 +121,6 @@ public class PollingSourceAdapter extends AbstractSourceAdapter implements if (!this.isInitialized()) { this.afterPropertiesSet(); } - if (this.getChannel() instanceof SynchronousChannel) { - if (logger.isInfoEnabled()) { - logger.info("source adapter configured on synchronous channel, not scheduling"); - } - this.running = true; - return; - } if (this.scheduler == null) { if (logger.isInfoEnabled()) { logger.info("no task scheduler has been provided, will create one");