You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2011/10/24 16:07:29 UTC

svn commit: r1188146 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java

Author: tabish
Date: Mon Oct 24 14:07:29 2011
New Revision: 1188146

URL: http://svn.apache.org/viewvc?rev=1188146&view=rev
Log:
Give this one just a bit more time to see if its just slow machines that cause it to fail.

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java?rev=1188146&r1=1188145&r2=1188146&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyFailoverTest.java Mon Oct 24 14:07:29 2011
@@ -22,6 +22,8 @@ import org.apache.activemq.broker.Broker
 import org.apache.activemq.util.ConsumerThread;
 import org.apache.activemq.util.ProducerThread;
 
+import java.util.concurrent.TimeUnit;
+
 import javax.jms.Connection;
 import javax.jms.Session;
 import java.net.URI;
@@ -33,9 +35,7 @@ public class ProxyFailoverTest extends T
 
     @Override
     protected void setUp() throws Exception {
-
         startRemoteBroker(true);
-
         proxyBroker = new BrokerService();
         ProxyConnector connector = new ProxyConnector();
         connector.setBind(new URI("tcp://localhost:51618"));
@@ -46,14 +46,12 @@ public class ProxyFailoverTest extends T
         proxyBroker.setUseJmx(false);
         proxyBroker.start();
         proxyBroker.waitUntilStarted();
-
     }
 
     @Override
     protected void tearDown() throws Exception {
         proxyBroker.stop();
         proxyBroker.waitUntilStopped();
-
         remoteBroker.stop();
         remoteBroker.waitUntilStopped();
     }
@@ -67,8 +65,6 @@ public class ProxyFailoverTest extends T
         producer.setSleep(10);
         producer.start();
 
-
-        //ActiveMQConnectionFactory consumerFactory = new ActiveMQConnectionFactory("tcp://localhost:51618?wireFormat.cacheEnabled=false");
         ActiveMQConnectionFactory consumerFactory = new ActiveMQConnectionFactory("tcp://localhost:51618");
         Connection consumerConnection = consumerFactory.createConnection();
         consumerConnection.start();
@@ -76,7 +72,7 @@ public class ProxyFailoverTest extends T
         ConsumerThread consumer = new ConsumerThread(consumerSession, consumerSession.createQueue("ProxyTest"));
         consumer.start();
 
-        Thread.sleep(10*1000);
+        TimeUnit.SECONDS.sleep(15);
 
         remoteBroker.stop();
         remoteBroker.waitUntilStopped();
@@ -86,7 +82,6 @@ public class ProxyFailoverTest extends T
         consumer.join();
 
         assertEquals(1000, consumer.getReceived());
-
     }
 
     protected void startRemoteBroker(boolean delete) throws Exception {