From ed1622dd346e01a4b9a73a52ab1e97fe0ebd1cb6 Mon Sep 17 00:00:00 2001 From: gtully Date: Fri, 15 May 2015 12:18:47 +0100 Subject: [PATCH] harden to address intermittent ci failure --- ...TwoBrokerVirtualTopicSelectorAwareForwardingTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicSelectorAwareForwardingTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicSelectorAwareForwardingTest.java index b2ab88ee02..63fdd5a6d3 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicSelectorAwareForwardingTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicSelectorAwareForwardingTest.java @@ -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"))