activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r892194 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java
Date Fri, 18 Dec 2009 09:29:55 GMT
Author: gtully
Date: Fri Dec 18 09:29:54 2009
New Revision: 892194

URL: http://svn.apache.org/viewvc?rev=892194&view=rev
Log:
trun off exponential backoff so that reconnect will happen before the timeout after restart,
intermittent failure in hudson

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java?rev=892194&r1=892193&r2=892194&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverTimeoutTest.java
Fri Dec 18 09:29:54 2009
@@ -28,7 +28,6 @@
 
 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 @@
 		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 @@
 			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);
 		



Mime
View raw message