You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/07/20 08:06:18 UTC

svn commit: r423794 - /incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java

Author: chirino
Date: Wed Jul 19 23:06:18 2006
New Revision: 423794

URL: http://svn.apache.org/viewvc?rev=423794&view=rev
Log:
increase the max amount of time we wait for reconnect since the default network reconnect delay could be up to 5 seconds

Modified:
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java?rev=423794&r1=423793&r2=423794&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java Wed Jul 19 23:06:18 2006
@@ -37,6 +37,8 @@
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
 
@@ -48,6 +50,8 @@
  */
 public class NetworkReconnectTest extends TestCase {
 
+	protected static final Log log = LogFactory.getLog(NetworkReconnectTest.class);
+	
 	private BrokerService producerBroker;
 	private BrokerService consumerBroker;
 	private ActiveMQConnectionFactory producerConnectionFactory;
@@ -182,6 +186,11 @@
 	}
 
 	protected void setUp() throws Exception {
+		
+		log.info("===============================================================================");
+		log.info("Running Test Case: "+getName());
+		log.info("===============================================================================");
+		
 		producerConnectionFactory = createProducerConnectionFactory();
 		consumerConnectionFactory = createConsumerConnectionFactory();
 		destination = new ActiveMQQueue("RECONNECT.TEST.QUEUE");
@@ -296,7 +305,7 @@
 			if( consumerCounter.get() > 0 ) {
 				return;
 			}
-			Thread.sleep(50);
+			Thread.sleep(100);
 		}
 		fail("The consumer did not arrive.");
 	}
@@ -306,7 +315,7 @@
 			if( consumerCounter.get() == 0 ) {
 				return;
 			}
-			Thread.sleep(50);
+			Thread.sleep(100);
 		}
 		fail("The consumer did not leave.");
 	}