From 08d89ff881a6fcaa0b6f2a28a759045717b024ee Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Fri, 18 Dec 2009 09:29:54 +0000 Subject: [PATCH] trun off exponential backoff so that reconnect will happen before the timeout after restart, intermittent failure in hudson git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@892194 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/transport/failover/FailoverTimeoutTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java index 8bd7bffed2..99129b3692 100644 --- a/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java @@ -28,7 +28,6 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; -import org.apache.activemq.broker.TransportConnector; public class FailoverTimeoutTest extends TestCase { @@ -43,7 +42,7 @@ public class FailoverTimeoutTest extends TestCase { bs.addConnector(tcpUri); bs.start(); - ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + tcpUri + ")?timeout=" + timeout); + ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("failover:(" + tcpUri + ")?timeout=" + timeout + "&useExponentialBackOff=false"); Connection connection = cf.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer producer = session.createProducer(session @@ -59,11 +58,11 @@ public class FailoverTimeoutTest extends TestCase { assertEquals("Failover timeout of " + timeout + " ms reached.", jmse.getMessage()); } - bs = new BrokerService(); - + bs = new BrokerService(); bs.setUseJmx(false); bs.addConnector(tcpUri); bs.start(); + bs.waitUntilStarted(); producer.send(message);