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.
This commit is contained in:
Gary Russell
2014-03-08 11:50:19 -05:00
parent df5877af17
commit 62352d1dd7
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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();
}