activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r900363 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
Date Mon, 18 Jan 2010 12:19:54 GMT
Author: dejanb
Date: Mon Jan 18 12:19:54 2010
New Revision: 900363

URL: http://svn.apache.org/viewvc?rev=900363&view=rev
Log:
prevent test failing on slower machines

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java?rev=900363&r1=900362&r2=900363&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/discovery/DiscoveryNetworkReconnectTest.java
Mon Jan 18 12:19:54 2010
@@ -91,6 +91,7 @@
         configure(brokerA);
         brokerA.addConnector("tcp://localhost:0");
         brokerA.start();
+        brokerA.waitUntilStarted();
         
         proxy = new SocketProxy(brokerA.getTransportConnectors().get(0).getConnectUri());
         managementContext = context.mock(ManagementContext.class);
@@ -146,7 +147,9 @@
     @After
     public void tearDown() throws Exception {
         brokerA.stop();
+        brokerA.waitUntilStopped();
         brokerB.stop();
+        brokerB.waitUntilStopped();
         proxy.close();
     }
     
@@ -165,6 +168,7 @@
 
         brokerB.addNetworkConnector(discoveryAddress + "&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
         brokerB.start();
+        brokerB.waitUntilStarted();
         doReconnect();
     }
     
@@ -174,7 +178,8 @@
     public void testSimpleReconnect() throws Exception {
         brokerB.addNetworkConnector("simple://(" + proxy.getUrl() 
                 + ")?useExponentialBackOff=false&initialReconnectDelay=500&wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=1000");
-        brokerB.start();       
+        brokerB.start();   
+        brokerB.waitUntilStarted();
         doReconnect();
     }
 
@@ -189,7 +194,7 @@
             }));
             
             // wait for network connector
-            assertTrue("network connector mbean registered within 1 minute", mbeanRegistered.tryAcquire(60,
TimeUnit.SECONDS));
+            assertTrue("network connector mbean registered within 2 minute", mbeanRegistered.tryAcquire(120,
TimeUnit.SECONDS));
             
             // force an inactivity timeout via the proxy
             proxy.pause();



Mime
View raw message