activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r806108 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java
Date Thu, 20 Aug 2009 10:21:14 GMT
Author: dejanb
Date: Thu Aug 20 10:21:14 2009
New Revision: 806108

URL: http://svn.apache.org/viewvc?rev=806108&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2183 - minor test modification to prevent intermittent
failures

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java?rev=806108&r1=806107&r2=806108&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java Thu
Aug 20 10:21:14 2009
@@ -114,7 +114,7 @@
         final MessageCounter counterA = new MessageCounter();
         connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQQueue("Consumer.A.VirtualTopic.T")).setMessageListener(counterA);
        
-        MessageCounter counterB = new MessageCounter();
+        final MessageCounter counterB = new MessageCounter();
         connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQQueue("Consumer.B.VirtualTopic.T")).setMessageListener(counterB);
        
         Thread.sleep(2000);
@@ -127,7 +127,7 @@
         
         Wait.waitFor(new Condition() {
             public boolean isSatisified() throws Exception {
-                return maxSent == counterA.getCount();
+                return maxSent == counterA.getCount() && maxSent == counterB.getCount();
             }
         });
         assertEquals(maxSent, counterA.getCount());



Mime
View raw message