From 1307646c3c56cbdd3d3f9386257fd23990a42415 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 12 Jun 2014 18:24:12 +0300 Subject: [PATCH] DSL: Polishing for `priorityChannel` test --- .../integration/dsl/test/IntegrationFlowTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-integration-java-dsl/src/test/java/org/springframework/integration/dsl/test/IntegrationFlowTests.java b/spring-integration-java-dsl/src/test/java/org/springframework/integration/dsl/test/IntegrationFlowTests.java index 327e94d..0bd0e59 100644 --- a/spring-integration-java-dsl/src/test/java/org/springframework/integration/dsl/test/IntegrationFlowTests.java +++ b/spring-integration-java-dsl/src/test/java/org/springframework/integration/dsl/test/IntegrationFlowTests.java @@ -830,7 +830,7 @@ public class IntegrationFlowTests { message = MessageBuilder.withPayload("31").setPriority(3).build(); this.priorityChannel.send(message); - Thread.sleep(2000); + this.controlBus.send("@priorityChannelBridge.start()"); Message receive = this.priorityReplyChannel.receive(2000); assertNotNull(receive); @@ -1130,7 +1130,9 @@ public class IntegrationFlowTests { @Bean public IntegrationFlow priorityFlow(PriorityCapableChannelMessageStore mongoDbChannelMessageStore) { return IntegrationFlows.from(MessageChannels.priority("priorityChannel", mongoDbChannelMessageStore, "priorityGroup")) - .bridge(s -> s.poller(Pollers.fixedDelay(1000, 5000)).id("priorityChannelBridge")) + .bridge(s -> s.poller(Pollers.fixedDelay(100)) + .autoStartup(false) + .id("priorityChannelBridge")) .channel(MessageChannels.queue("priorityReplyChannel")) .get(); }