From 8ab9a56d3594b40ecc4ae202200b635877088e82 Mon Sep 17 00:00:00 2001 From: gtully Date: Fri, 12 Sep 2014 14:45:03 +0100 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-5146 - fix test regression - with 20 rollback consumers the messages can exceed default redelivery policy --- .../src/test/java/org/apache/activemq/bugs/AMQ4157Test.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4157Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4157Test.java index 3a47f1d28e..d98652f276 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4157Test.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4157Test.java @@ -36,6 +36,7 @@ import javax.jms.Session; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.activemq.TestSupport; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.command.ActiveMQQueue; import org.apache.activemq.command.ConnectionControl; @@ -166,7 +167,7 @@ public class AMQ4157Test { broker.addConnector("tcp://0.0.0.0:0"); broker.start(); - String options = "?jms.prefetchPolicy.all=1000&jms.watchTopicAdvisories=false&jms.useAsyncSend=true&jms.alwaysSessionAsync=false&jms.dispatchAsync=false&socketBufferSize=131072&ioBufferSize=16384&wireFormat.tightEncodingEnabled=false&wireFormat.cacheSize=8192"; + String options = "?jms.redeliveryPolicy.maximumRedeliveries=-1&jms.prefetchPolicy.all=1000&jms.watchTopicAdvisories=false&jms.useAsyncSend=true&jms.alwaysSessionAsync=false&jms.dispatchAsync=false&socketBufferSize=131072&ioBufferSize=16384&wireFormat.tightEncodingEnabled=false&wireFormat.cacheSize=8192"; connectionFactory = new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getConnectUri() + options); } } \ No newline at end of file