activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6129
Date Mon, 18 Jan 2016 15:29:47 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x d5101d46a -> 6abb5b9be


https://issues.apache.org/jira/browse/AMQ-6129

Fixing DynamicallyIncludedDestinationsDuplexNetworkTest

(cherry picked from commit 1ae29382e12dd9704d78f12b7948b442005ce086)


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

Branch: refs/heads/activemq-5.13.x
Commit: 6abb5b9bee0269bd4e8d16ca0b74770a67ee3ee8
Parents: d5101d4
Author: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Authored: Mon Jan 18 15:27:11 2016 +0000
Committer: Christopher L. Shannon (cshannon) <christopher.l.shannon@gmail.com>
Committed: Mon Jan 18 15:29:34 2016 +0000

----------------------------------------------------------------------
 ...callyIncludedDestinationsDuplexNetworkTest.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/6abb5b9b/activemq-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
index 3dd8be6..a647abe 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
@@ -19,6 +19,7 @@ package org.apache.activemq.network;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.lang.reflect.Field;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -30,6 +31,7 @@ import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnection;
 import org.apache.activemq.broker.TransportConnector;
+import org.apache.activemq.util.Wait;
 import org.junit.Test;
 
 /**
@@ -114,4 +116,19 @@ public class DynamicallyIncludedDestinationsDuplexNetworkTest extends
SimpleNetw
         TransportConnection duplexBridgeConnectionFromRemote = transportConnections.get(0);
         return duplexBridgeConnectionFromRemote;
     }
+
+    @Override
+    protected void assertNetworkBridgeStatistics(final long expectedLocalSent, final long
expectedRemoteSent) throws Exception {
+
+        final NetworkBridge localBridge = localBroker.getNetworkConnectors().get(0).activeBridges().iterator().next();
+
+        assertTrue(Wait.waitFor(new Wait.Condition() {
+            @Override
+            public boolean isSatisified() throws Exception {
+                return expectedLocalSent == localBridge.getNetworkBridgeStatistics().getDequeues().getCount()
&&
+                        expectedRemoteSent == localBridge.getNetworkBridgeStatistics().getReceivedCount().getCount();
+            }
+        }));
+
+    }
 }


Mime
View raw message