activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r631662 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
Date Wed, 27 Feb 2008 17:44:11 GMT
Author: chirino
Date: Wed Feb 27 09:44:07 2008
New Revision: 631662

URL: http://svn.apache.org/viewvc?rev=631662&view=rev
Log:
Added better weighted sleeps to make sure everything is going before we start sampling.

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java?rev=631662&r1=631661&r2=631662&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
Wed Feb 27 09:44:07 2008
@@ -123,8 +123,11 @@
 			brokers[i] = createBroker(i);
 			brokers[i].start();
 		}
-		// Wait for the brokers to finish starting up and establish thier network connections.
-		Thread.sleep(BROKER_COUNT*400);
+		
+		// Wait for the network connection to get setup.
+		// The wait is exponential since every broker has to connect to every other broker.
+		Thread.sleep(BROKER_COUNT*BROKER_COUNT*50);
+		
 		forwardingClients = new ForwardingClient[BROKER_COUNT-1];		
 		for (int i = 0; i < forwardingClients.length; i++) {
 		    LOG.info("Starting fowarding client "+i);
@@ -258,6 +261,10 @@
 			}
 		};
 		producer.start();
+	
+		
+		// Give the forwarding clients a chance to get going and fill the down stream broker queues..
+		Thread.sleep(BROKER_COUNT*200);
 		
         for (int i = 0; i < SAMPLES; i++) {
 



Mime
View raw message