activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r360318 - /incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
Date Sat, 31 Dec 2005 16:34:02 GMT
Author: chirino
Date: Sat Dec 31 08:33:49 2005
New Revision: 360318

URL: http://svn.apache.org/viewcvs?rev=360318&view=rev
Log:
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.

Modified:
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java?rev=360318&r1=360317&r2=360318&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
Sat Dec 31 08:33:49 2005
@@ -139,6 +139,9 @@
         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);
     }
 }



Mime
View raw message