mirror of https://github.com/apache/activemq.git
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:
parent
ea44017640
commit
d295d21a13
|
@ -114,7 +114,7 @@ public class AMQ2183Test extends TestCase implements UncaughtExceptionHandler, M
|
||||||
final MessageCounter counterA = new MessageCounter();
|
final MessageCounter counterA = new MessageCounter();
|
||||||
connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQQueue("Consumer.A.VirtualTopic.T")).setMessageListener(counterA);
|
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);
|
connection.createSession(false, Session.AUTO_ACKNOWLEDGE).createConsumer(new ActiveMQQueue("Consumer.B.VirtualTopic.T")).setMessageListener(counterB);
|
||||||
|
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
|
@ -127,7 +127,7 @@ public class AMQ2183Test extends TestCase implements UncaughtExceptionHandler, M
|
||||||
|
|
||||||
Wait.waitFor(new Condition() {
|
Wait.waitFor(new Condition() {
|
||||||
public boolean isSatisified() throws Exception {
|
public boolean isSatisified() throws Exception {
|
||||||
return maxSent == counterA.getCount();
|
return maxSent == counterA.getCount() && maxSent == counterB.getCount();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
assertEquals(maxSent, counterA.getCount());
|
assertEquals(maxSent, counterA.getCount());
|
||||||
|
|
Loading…
Reference in New Issue