added a sleep after consumers are added and before sending messages

to ensure subscriptions are propagated

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@378730 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-02-18 15:25:28 +00:00
parent 7f384b620e
commit dfc025b6ce
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,7 @@ import java.net.URI;
* @version $Revision: 1.1.1.1 $
*/
public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport {
public static final int BROKER_COUNT = 5; // number of brokers to network
public static final int BROKER_COUNT = 2; // number of brokers to network
public static final int CONSUMER_COUNT = 3; // consumers per broker
public static final int PRODUCER_COUNT = 3; // producers per broker
public static final int MESSAGE_COUNT = 10; // messages per producer
@ -50,6 +50,8 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport
consumerMap.put("Consumer:" + i + ":" + j, createConsumer("Broker" + i, dest));
}
}
//wait for consumers to get propagated
Thread.sleep(2000);
// Send messages
for (int i=1; i<=BROKER_COUNT; i++) {
@ -82,6 +84,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport
consumerMap.put("Consumer:" + i + ":" + j, createConsumer("Broker" + i, dest));
}
}
Thread.sleep(2000);
// Send messages
for (int i=1; i<=BROKER_COUNT; i++) {