mirror of https://github.com/apache/activemq.git
Wait for the queue consumers to connect before sending the messages.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@643461 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bcacddfaad
commit
6f851c8cce
|
@ -35,7 +35,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport
|
|||
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
|
||||
public static final int MESSAGE_COUNT = 20; // messages per producer
|
||||
|
||||
protected Map consumerMap;
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport
|
|||
}
|
||||
}
|
||||
|
||||
assertTrue("Missing " + latch.getCount() + " messages", latch.await(30, TimeUnit.SECONDS));
|
||||
assertTrue("Missing " + latch.getCount() + " messages", latch.await(45, TimeUnit.SECONDS));
|
||||
|
||||
// Get message count
|
||||
for (int i = 1; i <= BROKER_COUNT; i++) {
|
||||
|
@ -97,7 +97,10 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport
|
|||
}
|
||||
|
||||
// wait for consumers to get propagated
|
||||
Thread.sleep(5000);
|
||||
for (int i = 1; i <= BROKER_COUNT; i++) {
|
||||
// all consumers on the remote brokers look like 1 consumer to the local broker.
|
||||
assertConsumersConnect("Broker" + i, dest, (BROKER_COUNT-1)+CONSUMER_COUNT, 30000);
|
||||
}
|
||||
|
||||
// Send messages
|
||||
for (int i = 1; i <= BROKER_COUNT; i++) {
|
||||
|
@ -107,7 +110,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport
|
|||
}
|
||||
|
||||
// Wait for messages to be delivered
|
||||
assertTrue("Missing " + latch.getCount() + " messages", latch.await(30, TimeUnit.SECONDS));
|
||||
assertTrue("Missing " + latch.getCount() + " messages", latch.await(45, TimeUnit.SECONDS));
|
||||
|
||||
// Get message count
|
||||
int totalMsg = 0;
|
||||
|
|
Loading…
Reference in New Issue