From d295d21a13136ff11939af6fcd94473abd77c1e5 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Thu, 20 Aug 2009 10:21:14 +0000 Subject: [PATCH] https://issues.apache.org/activemq/browse/AMQ-2183 - minor test modification to prevent intermittent failures git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@806108 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/activemq/bugs/AMQ2183Test.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java index 90d4f04e9b..476affdc2e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2183Test.java @@ -114,7 +114,7 @@ public class AMQ2183Test extends TestCase implements UncaughtExceptionHandler, M 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 @@ public class AMQ2183Test extends TestCase implements UncaughtExceptionHandler, M Wait.waitFor(new Condition() { public boolean isSatisified() throws Exception { - return maxSent == counterA.getCount(); + return maxSent == counterA.getCount() && maxSent == counterB.getCount(); } }); assertEquals(maxSent, counterA.getCount());