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
This commit is contained in:
Bosanac Dejan 2009-08-20 10:21:14 +00:00
parent ea44017640
commit d295d21a13
1 changed files with 2 additions and 2 deletions

View File

@ -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());