activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-645 ClusteredGroupingTest fails
Date Mon, 25 Jul 2016 09:54:18 GMT
ARTEMIS-645 ClusteredGroupingTest fails

In testGroupingSendTo3queuesNoConsumerOnLocalQueue the batch
of messages can be received also by the second consumer. It
depends on cluster decision.


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

Branch: refs/heads/master
Commit: d0cb3b1d174fb38ff755bf65054aa4c5cecd1ca1
Parents: 771dab1
Author: Erich Duda <eduda@redhat.com>
Authored: Wed Jul 20 15:48:10 2016 +0200
Committer: Andy Taylor <andy.tayls67@gmail.com>
Committed: Mon Jul 25 10:53:48 2016 +0100

----------------------------------------------------------------------
 .../distribution/ClusteredGroupingTest.java      | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d0cb3b1d/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
index c15ded0..ecf5aae 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java
@@ -1225,15 +1225,28 @@ public class ClusteredGroupingTest extends ClusterTestBase {
       waitForBindings(1, "queues.testaddress", 2, 2, false);
       waitForBindings(2, "queues.testaddress", 2, 1, false);
 
+      sendInRange(1, "queues.testaddress", 0, 1, false, Message.HDR_GROUP_ID, new SimpleString("id1"));
+
+      int consumer = 0;
+      if (consumers[0].consumer.receive(5000) != null) {
+         consumer = 0;
+      }
+      else if (consumers[2].consumer.receive(5000) != null) {
+         consumer = 2;
+      }
+      else {
+         fail("Message was not received.");
+      }
+
       sendInRange(1, "queues.testaddress", 0, 10, false, Message.HDR_GROUP_ID, new SimpleString("id1"));
 
-      verifyReceiveAllInRange(0, 10, 0);
+      verifyReceiveAllInRange(0, 10, consumer);
       sendInRange(2, "queues.testaddress", 10, 20, false, Message.HDR_GROUP_ID, new SimpleString("id1"));
 
-      verifyReceiveAllInRange(10, 20, 0);
+      verifyReceiveAllInRange(10, 20, consumer);
       sendInRange(0, "queues.testaddress", 20, 30, false, Message.HDR_GROUP_ID, new SimpleString("id1"));
 
-      verifyReceiveAllInRange(20, 30, 0);
+      verifyReceiveAllInRange(20, 30, consumer);
 
    }
 


Mime
View raw message