activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: [AMQ-6465] fix up test interplay - clean on start and consume what is produced
Date Wed, 03 May 2017 11:22:38 GMT
Repository: activemq
Updated Branches:
  refs/heads/master a0ba0bf4c -> c4a134687


[AMQ-6465] fix up test interplay - clean on start and consume what is produced


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

Branch: refs/heads/master
Commit: c4a1346875dc40c1469e5b9625efe73eccb4b081
Parents: a0ba0bf
Author: gtully <gary.tully@gmail.com>
Authored: Wed May 3 12:22:24 2017 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Wed May 3 12:22:24 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/activemq/network/NetworkRestartTest.java | 2 ++
 .../java/org/apache/activemq/network/SimpleNetworkTest.java  | 8 ++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/c4a13468/activemq-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
index 2449fc0..2ebf03e 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
@@ -135,9 +135,11 @@ public class NetworkRestartTest extends TestSupport {
     protected void doSetUp() throws Exception {
 
         remoteBroker = createRemoteBroker();
+        remoteBroker.setDeleteAllMessagesOnStartup(true);
         remoteBroker.start();
         remoteBroker.waitUntilStarted();
         localBroker = createLocalBroker();
+        localBroker.setDeleteAllMessagesOnStartup(true);
         localBroker.start();
         localBroker.waitUntilStarted();
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/c4a13468/activemq-unit-tests/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
index 73d8a4f..2df48dd 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/network/SimpleNetworkTest.java
@@ -258,6 +258,10 @@ public class SimpleNetworkTest {
                 return localBroker.getSystemUsage().getMemoryUsage().getUsage() == 0;
             }
         }, 10000, 500));
+
+        for (int i = 0; i < MESSAGE_COUNT; i++) {
+            assertNotNull("message count: " + i, remoteConsumer.receive(2500));
+        }
         remoteConsumer.close();
     }
 
@@ -287,6 +291,10 @@ public class SimpleNetworkTest {
                 return localBroker.getSystemUsage().getMemoryUsage().getUsage() == 0;
             }
         }, 10000, 500));
+
+        for (int i = 0; i < MESSAGE_COUNT; i++) {
+            assertNotNull("message count: " + i, remoteConsumer.receive(2500));
+        }
         remoteConsumer.close();
     }
 


Mime
View raw message