Fix some sporadic tests failures

https://build.spring.io/browse/INT-MASTER-1004/
This commit is contained in:
Artem Bilan
2018-04-19 17:35:50 -04:00
parent 82cbafaaa4
commit 1f6f70b4ef
4 changed files with 18 additions and 12 deletions

View File

@@ -20,7 +20,7 @@
<bean id="testTrigger" class="org.springframework.integration.test.util.OnlyOnceTrigger"/>
<int:bridge input-channel="input" output-channel="next">
<int:poller trigger="testTrigger" receive-timeout="10000" />
<int:poller trigger="testTrigger" receive-timeout="100000" />
</int:bridge>
<int:service-activator input-channel="next">
@@ -29,7 +29,7 @@
<int:inbound-channel-adapter channel="pubsub">
<bean class="org.springframework.integration.monitor.MonitorTests$TestSource" />
<int:poller fixed-delay="500" />
<int:poller fixed-delay="50" />
</int:inbound-channel-adapter>
<int:publish-subscribe-channel id="pubsub" />

View File

@@ -98,7 +98,7 @@ public class MonitorTests {
new DirectFieldAccessor(this.next).setPropertyValue("channelMetrics", channelMetrics);
MessagingTemplate messagingTemplate = new MessagingTemplate(this.input);
messagingTemplate.setReceiveTimeout(10000);
messagingTemplate.setReceiveTimeout(100000);
Integer active = messagingTemplate.convertSendAndReceive("foo", Integer.class);
assertEquals(1, active.intValue());
assertTrue(afterSendLatch.await(10, TimeUnit.SECONDS));
@@ -111,7 +111,7 @@ public class MonitorTests {
assertEquals(1, this.next.getSendCount());
assertThat(this.next.getSendDuration().getMax(), greaterThan(99.0));
assertThat(this.next.getSendDuration().getMax(), lessThan(10000.0));
Message<?> fromInbound = this.output.receive(10000);
Message<?> fromInbound = this.output.receive(100000);
assertNotNull(fromInbound);
assertEquals(0, fromInbound.getPayload());
fromInbound = this.output.receive(10000);