harden to address intermittent ci failure

This commit is contained in:
gtully 2015-05-15 12:18:47 +01:00
parent 29fb4a4b3f
commit ed1622dd34
1 changed files with 9 additions and 0 deletions

View File

@ -427,6 +427,15 @@ public class TwoBrokerVirtualTopicSelectorAwareForwardingTest extends
// assert broker A stats
assertEquals(30, brokerA.getDestination(new ActiveMQQueue("Consumer.B.VirtualTopic.tempTopic"))
.getDestinationStatistics().getEnqueues().getCount());
Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return brokerA.getDestination(new ActiveMQQueue("Consumer.B.VirtualTopic.tempTopic"))
.getDestinationStatistics().getEnqueues().getCount() == 30;
}
}, 5000);
assertEquals(30, brokerA.getDestination(new ActiveMQQueue("Consumer.B.VirtualTopic.tempTopic"))
.getDestinationStatistics().getDequeues().getCount());
assertEquals(0, brokerA.getDestination(new ActiveMQQueue("Consumer.B.VirtualTopic.tempTopic"))