INT-3212: Fix Failed Tests From CI Builds
JIRA: https://jira.springsource.org/browse/INT-3212 INT-3212 Fix Failing TCP Test TcpNioConnections can deadlock when a fixed thread pool is being used. The deadlock is detected after 60 seconds, but the test case failed after 20 seconds - before the deadlock was detected. Change the test to use a cached thread pool instead. Also, increase concurrency by using threading in the test server so each socket is handled on a separate thread. Enchance connectionId to include both local and remote ports to aid debugging. Some minor formatting corrections.
This commit is contained in:
committed by
Gary Russell
parent
6b50c49efe
commit
405fce672b
@@ -40,7 +40,7 @@
|
||||
|
||||
<chain input-channel="pollableInput1" output-channel="output">
|
||||
<filter ref="typeSelector"/>
|
||||
<poller fixed-delay="10000"/>
|
||||
<poller fixed-delay="1000"/>
|
||||
<service-activator ref="testHandler"/>
|
||||
</chain>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<poller ref="topLevelPoller"/>
|
||||
</chain>
|
||||
|
||||
<poller id="topLevelPoller" fixed-delay="5000"/>
|
||||
<poller id="topLevelPoller" fixed-delay="1000"/>
|
||||
|
||||
<chain input-channel="beanInput" output-channel="output">
|
||||
<beans:bean
|
||||
@@ -67,7 +67,7 @@
|
||||
</chain>
|
||||
</chain>
|
||||
|
||||
<chain id="aggregatorChain2" input-channel="aggregatorInput" output-channel="output">
|
||||
<chain id="aggregatorChain2" input-channel="aggregator2Input" output-channel="output">
|
||||
<aggregator id="aggregatorWithinChain" ref="aggregatorBean" method="aggregate"/>
|
||||
<chain id="nestedChain">
|
||||
<filter id="filterWithinNestedChain" ref="typeSelector"/>
|
||||
|
||||
@@ -171,7 +171,7 @@ public class ChainParserTests {
|
||||
public void chainWithAcceptingFilter() {
|
||||
Message<?> message = MessageBuilder.withPayload("test").build();
|
||||
this.filterInput.send(message);
|
||||
Message<?> reply = this.output.receive(0);
|
||||
Message<?> reply = this.output.receive(1000);
|
||||
assertNotNull(reply);
|
||||
assertEquals("foo", reply.getPayload());
|
||||
}
|
||||
@@ -188,7 +188,7 @@ public class ChainParserTests {
|
||||
public void chainWithHeaderEnricher() {
|
||||
Message<?> message = MessageBuilder.withPayload(123).build();
|
||||
this.headerEnricherInput.send(message);
|
||||
Message<?> reply = this.replyOutput.receive(0);
|
||||
Message<?> reply = this.replyOutput.receive(1000);
|
||||
assertNotNull(reply);
|
||||
assertEquals("foo", reply.getPayload());
|
||||
assertEquals("ABC", reply.getHeaders().getCorrelationId());
|
||||
@@ -239,8 +239,8 @@ public class ChainParserTests {
|
||||
Message<?> message2 = MessageBuilder.withPayload(123).build();
|
||||
this.payloadTypeRouterInput.send(message1);
|
||||
this.payloadTypeRouterInput.send(message2);
|
||||
Message<?> reply1 = this.strings.receive(0);
|
||||
Message<?> reply2 = this.numbers.receive(0);
|
||||
Message<?> reply1 = this.strings.receive(1000);
|
||||
Message<?> reply2 = this.numbers.receive(1000);
|
||||
assertNotNull(reply1);
|
||||
assertNotNull(reply2);
|
||||
assertEquals("test", reply1.getPayload());
|
||||
@@ -253,8 +253,8 @@ public class ChainParserTests {
|
||||
Message<?> message2 = MessageBuilder.withPayload(123).setHeader("routingHeader", "numbers").build();
|
||||
this.headerValueRouterInput.send(message1);
|
||||
this.headerValueRouterInput.send(message2);
|
||||
Message<?> reply1 = this.strings.receive(0);
|
||||
Message<?> reply2 = this.numbers.receive(0);
|
||||
Message<?> reply1 = this.strings.receive(1000);
|
||||
Message<?> reply2 = this.numbers.receive(1000);
|
||||
assertNotNull(reply1);
|
||||
assertNotNull(reply2);
|
||||
assertEquals("test", reply1.getPayload());
|
||||
|
||||
Reference in New Issue
Block a user