You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2015/04/16 16:31:30 UTC

[2/2] activemq git commit: remove timing depdendency

remove timing depdendency


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/7dc522d4
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/7dc522d4
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/7dc522d4

Branch: refs/heads/master
Commit: 7dc522d4c30736191aa256f07be051dc5e5f5e94
Parents: 4441001
Author: gtully <ga...@gmail.com>
Authored: Mon Apr 13 16:46:08 2015 +0100
Committer: gtully <ga...@gmail.com>
Committed: Thu Apr 16 15:25:58 2015 +0100

----------------------------------------------------------------------
 .../apache/activemq/network/DemandForwardingBridgeTest.java   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/7dc522d4/activemq-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
index 9794337..9c23781 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
@@ -75,6 +75,13 @@ public class DemandForwardingBridgeTest extends NetworkTestSupport {
         connection1.send(consumerInfo1.createRemoveCommand());
 
         final DestinationStatistics destinationStatistics = broker.getDestination(destination).getDestinationStatistics();
+
+        Wait.waitFor(new Wait.Condition() {
+            @Override
+            public boolean isSatisified() throws Exception {
+                return 1 == destinationStatistics.getDispatched().getCount();
+            }
+        });
         assertEquals("broker dest stat dispatched", 1, destinationStatistics.getDispatched().getCount());
         assertEquals("broker dest stat dequeues", 0, destinationStatistics.getDequeues().getCount());
         assertEquals("broker dest stat forwards", 0, destinationStatistics.getForwards().getCount());