mirror of https://github.com/apache/activemq.git
explicitly set redelivery policy to ensure no default 1 sec delay, speed up test
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@997647 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dc5ebcd51c
commit
f0de24c8e3
|
@ -21,6 +21,7 @@ import java.util.concurrent.TimeUnit;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageConsumer;
|
||||
|
@ -28,7 +29,9 @@ import javax.jms.MessageListener;
|
|||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.EmbeddedBrokerTestSupport;
|
||||
import org.apache.activemq.RedeliveryPolicy;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.jms.core.MessageCreator;
|
||||
|
@ -100,6 +103,17 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup
|
|||
fail("Did not receive all the messages.");
|
||||
}
|
||||
|
||||
protected ConnectionFactory createConnectionFactory() throws Exception {
|
||||
ActiveMQConnectionFactory answer = (ActiveMQConnectionFactory) super.createConnectionFactory();
|
||||
RedeliveryPolicy policy = new RedeliveryPolicy();
|
||||
policy.setMaximumRedeliveries(3);
|
||||
policy.setRedeliveryDelay(0);
|
||||
policy.setInitialRedeliveryDelay(0);
|
||||
policy.setUseExponentialBackOff(false);
|
||||
answer.setRedeliveryPolicy(policy);
|
||||
return answer;
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
|
|
Loading…
Reference in New Issue