You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/05/09 18:33:04 UTC
[1/2] activemq-artemis git commit: Make
ScaleDownTest#testStoreAndForward more robust
Repository: activemq-artemis
Updated Branches:
refs/heads/master 784652160 -> 8e7f87684
Make ScaleDownTest#testStoreAndForward more robust
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/9794ac76
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/9794ac76
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/9794ac76
Branch: refs/heads/master
Commit: 9794ac769be277a214eaf8441eec199bcc4903a1
Parents: 7846521
Author: jbertram <jb...@apache.org>
Authored: Fri May 6 13:25:59 2016 -0500
Committer: jbertram <jb...@apache.org>
Committed: Fri May 6 13:25:59 2016 -0500
----------------------------------------------------------------------
.../tests/integration/server/ScaleDownTest.java | 29 ++++++++++++++++++--
1 file changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/9794ac76/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
index db2a907..dfc252f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ScaleDownTest.java
@@ -181,10 +181,33 @@ public class ScaleDownTest extends ClusterTestBase {
addConsumer(0, 1, queueName1, null);
addConsumer(1, 1, queueName2, null);
+ LocalQueueBinding queue1Binding = ((LocalQueueBinding) servers[0].getPostOffice().getBinding(new SimpleString(queueName1)));
+ LocalQueueBinding queue2Binding = ((LocalQueueBinding) servers[0].getPostOffice().getBinding(new SimpleString(queueName2)));
+ LocalQueueBinding sfQueueBinding = ((LocalQueueBinding) servers[0].getPostOffice().getBinding(new SimpleString(sfQueueName)));
+
+ long timeout = 5000;
+ long start = System.currentTimeMillis();
+
+ while (getMessageCount(queue1Binding.getQueue()) > 0 && System.currentTimeMillis() - start <= timeout) {
+ Thread.sleep(50);
+ }
+
+ start = System.currentTimeMillis();
+
+ while (getMessageCount(queue2Binding.getQueue()) > 0 && System.currentTimeMillis() - start <= timeout) {
+ Thread.sleep(50);
+ }
+
+ start = System.currentTimeMillis();
+
+ while (getMessageCount(sfQueueBinding.getQueue()) < TEST_SIZE * 2 && System.currentTimeMillis() - start <= timeout) {
+ Thread.sleep(50);
+ }
+
// at this point on node 0 there should be 0 messages in test queues and TEST_SIZE * 2 messages in the sf queue
- Assert.assertEquals(0, getMessageCount(((LocalQueueBinding) servers[0].getPostOffice().getBinding(new SimpleString(queueName1))).getQueue()));
- Assert.assertEquals(0, getMessageCount(((LocalQueueBinding) servers[0].getPostOffice().getBinding(new SimpleString(queueName2))).getQueue()));
- Assert.assertEquals(TEST_SIZE * 2, getMessageCount(((LocalQueueBinding) servers[0].getPostOffice().getBinding(new SimpleString(sfQueueName))).getQueue()));
+ Assert.assertEquals(0, getMessageCount(queue1Binding.getQueue()));
+ Assert.assertEquals(0, getMessageCount(queue2Binding.getQueue()));
+ Assert.assertEquals(TEST_SIZE * 2, getMessageCount(sfQueueBinding.getQueue()));
removeConsumer(0);
removeConsumer(1);
[2/2] activemq-artemis git commit: This closes #511
Posted by cl...@apache.org.
This closes #511
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8e7f8768
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8e7f8768
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8e7f8768
Branch: refs/heads/master
Commit: 8e7f87684350ec0f3b5eb58dfcf35067a80d63e0
Parents: 7846521 9794ac7
Author: Clebert Suconic <cl...@apache.org>
Authored: Mon May 9 14:32:48 2016 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon May 9 14:32:48 2016 -0400
----------------------------------------------------------------------
.../tests/integration/server/ScaleDownTest.java | 29 ++++++++++++++++++--
1 file changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------