From 62352d1dd7804e5ee4f7d72d2cc8b316183eb6c8 Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Sat, 8 Mar 2014 11:50:19 -0500 Subject: [PATCH] INT-3288 Increase Test Timeouts JIRA: https://jira.spring.io/browse/INT-3288 Sometimes, even locally with no load, ActiveMQ takes over 5 seconds to deliver the message with a polled adapter. Increase timeout to 20 seconds instead of 2. --- .../integration/jms/JmsInboundChannelAdapterTests.java | 2 +- .../integration/jms/JmsOutboundChannelAdapterTests.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsInboundChannelAdapterTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsInboundChannelAdapterTests.java index 6364e1d041..bd1f4d4b73 100644 --- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsInboundChannelAdapterTests.java +++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsInboundChannelAdapterTests.java @@ -51,7 +51,7 @@ public class JmsInboundChannelAdapterTests extends ActiveMQMultiContextTests { public void testTransactionalReceive() { JmsTemplate template = new JmsTemplate(connectionFactory); template.convertAndSend("foo", "bar"); - assertNotNull(out.receive(2000)); + assertNotNull(out.receive(20000)); /* * INT-3288 - previously acknowledge="transacted" * Caused by: javax.jms.JMSException: acknowledgeMode SESSION_TRANSACTED cannot be used for an non-transacted Session diff --git a/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundChannelAdapterTests.java b/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundChannelAdapterTests.java index 1eda51e267..3338c6301f 100644 --- a/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundChannelAdapterTests.java +++ b/spring-integration-jms/src/test/java/org/springframework/integration/jms/JmsOutboundChannelAdapterTests.java @@ -57,11 +57,12 @@ public class JmsOutboundChannelAdapterTests extends ActiveMQMultiContextTests { public void testTransactionalSend() { JmsTemplate template = new JmsTemplate(connectionFactory); template.convertAndSend("foo", "Hello, world!"); - template.setReceiveTimeout(1000); + template.setReceiveTimeout(20000); assertNotNull(template.receive("bar")); this.aborter.abort = true; template.convertAndSend("foo", "Hello, world!"); + template.setReceiveTimeout(1000); assertNull(template.receive("bar")); endpoint.stop(); }