mirror of https://github.com/apache/activemq.git
Added better weighted sleeps to make sure everything is going before we start sampling.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@631662 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a9120b1b12
commit
b01374e05f
|
@ -123,8 +123,11 @@ public class NetworkLoadTest extends TestCase {
|
||||||
brokers[i] = createBroker(i);
|
brokers[i] = createBroker(i);
|
||||||
brokers[i].start();
|
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];
|
forwardingClients = new ForwardingClient[BROKER_COUNT-1];
|
||||||
for (int i = 0; i < forwardingClients.length; i++) {
|
for (int i = 0; i < forwardingClients.length; i++) {
|
||||||
LOG.info("Starting fowarding client "+i);
|
LOG.info("Starting fowarding client "+i);
|
||||||
|
@ -258,6 +261,10 @@ public class NetworkLoadTest extends TestCase {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
producer.start();
|
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++) {
|
for (int i = 0; i < SAMPLES; i++) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue