activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1324799 - in /activemq/trunk/activemq-core/src/test: java/org/apache/activemq/usecases/ resources/org/apache/activemq/usecases/
Date Wed, 11 Apr 2012 15:03:03 GMT
Author: dejanb
Date: Wed Apr 11 15:03:03 2012
New Revision: 1324799

URL: http://svn.apache.org/viewvc?rev=1324799&view=rev
Log:
ClientRebalanceTest - fix the test to avoid occasional hang

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java
    activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker1.xml
    activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker2.xml
    activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker3.xml

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java?rev=1324799&r1=1324798&r2=1324799&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java
Wed Apr 11 15:03:03 2012
@@ -37,6 +37,7 @@ public class ClientRebalanceTest extends
         super.setUp();
     }
 
+
     public void testRebalance() throws Exception {
         createBroker(new ClassPathResource("org/apache/activemq/usecases/rebalance-broker1.xml"));
         createBroker(new ClassPathResource("org/apache/activemq/usecases/rebalance-broker2.xml"));
@@ -62,15 +63,15 @@ public class ClientRebalanceTest extends
         // introduce third broker
         createBroker(new ClassPathResource("org/apache/activemq/usecases/rebalance-broker3.xml"));
         brokers.get("b3").broker.waitUntilStarted();
-
-        Thread.sleep(1000);
+        
+        Thread.sleep(3000);
 
         LOG.info("Stopping broker 1");
 
         brokers.get("b1").broker.stop();
         brokers.get("b1").broker.waitUntilStopped();
-
-        Thread.sleep(1000);
+        
+        Thread.sleep(3000);
         // should reconnect to some of the remaining brokers
         producer.send(message);
         msg = consumer.receive(2000);

Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker1.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker1.xml?rev=1324799&r1=1324798&r2=1324799&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker1.xml
(original)
+++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker1.xml
Wed Apr 11 15:03:03 2012
@@ -1,8 +1,8 @@
 <beans xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd"
xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <broker brokerName="b1" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
         <networkConnectors>
-            <networkConnector name="b1_b2" uri="static://tcp://localhost:61617" duplex="false"/>
-            <networkConnector name="b1_b3" uri="static://tcp://localhost:61618"></networkConnector>
+            <networkConnector name="b1_b2" uri="static:(tcp://localhost:61617)?useExponentialBackOff=false"
duplex="false"/>
+            <networkConnector name="b1_b3" uri="static:(tcp://localhost:61618)?useExponentialBackOff=false"></networkConnector>
         </networkConnectors>
 
         <!-- The transport connectors ActiveMQ will listen to -->

Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker2.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker2.xml?rev=1324799&r1=1324798&r2=1324799&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker2.xml
(original)
+++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker2.xml
Wed Apr 11 15:03:03 2012
@@ -2,8 +2,8 @@
         <broker brokerName="b2" persistent="false" useJmx="false" xmlns="http://activemq.apache.org/schema/core">
 
         <networkConnectors>
-            <networkConnector name="b2_b1" uri="static://tcp://localhost:61616" duplex="false"/>
-            <networkConnector name="b2_b3" uri="static://tcp://localhost:61618"></networkConnector>
+            <networkConnector name="b2_b1" uri="static:(tcp://localhost:61616)?useExponentialBackOff=false"
duplex="false"/>
+            <networkConnector name="b2_b3" uri="static:(tcp://localhost:61618)?useExponentialBackOff=false"></networkConnector>
         </networkConnectors>
 
         <!-- The transport connectors ActiveMQ will listen to -->

Modified: activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker3.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker3.xml?rev=1324799&r1=1324798&r2=1324799&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker3.xml
(original)
+++ activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/usecases/rebalance-broker3.xml
Wed Apr 11 15:03:03 2012
@@ -1,8 +1,8 @@
 <beans xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.5.0.xsd"
xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <broker brokerName="b3" persistent="false" useJmx="true" xmlns="http://activemq.apache.org/schema/core">
         <networkConnectors>
-            <networkConnector name="b3_b1" uri="static://tcp://localhost:61616"></networkConnector>
-            <networkConnector name="b3_b2" uri="static://tcp://localhost:61617"></networkConnector>
+            <networkConnector name="b3_b1" uri="static:(tcp://localhost:61616)?useExponentialBackOff=false"></networkConnector>
+            <networkConnector name="b3_b2" uri="static:(tcp://localhost:61617)?useExponentialBackOff=false"></networkConnector>
         </networkConnectors>
 
         <!-- The transport connectors ActiveMQ will listen to -->



Mime
View raw message