The testcase would wait for all the messages to arrive. But in the topic case the total number of messages computed was wrong and the test would not wait long enough.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@360318 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2005-12-31 16:33:49 +00:00
parent 3516e1005a
commit 14f96a9e6f
1 changed files with 4 additions and 1 deletions

View File

@ -139,6 +139,9 @@ public class QueueSubscriptionTest extends JmsMultipleClientsTestSupport {
startProducers(dest, messageCount);
// Wait for messages to be received. Make it proportional to the messages delivered.
waitForAllMessagesToBeReceived(messageCount * producerCount);
int totalMessageCount = messageCount * producerCount;
if( dest.isTopic() )
totalMessageCount *= consumerCount;
waitForAllMessagesToBeReceived(totalMessageCount);
}
}