activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [12/27] activemq-artemis git commit: Fix a few cluster tests
Date Wed, 30 Nov 2016 13:27:32 GMT
Fix a few cluster tests


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

Branch: refs/heads/ARTEMIS-780
Commit: 4e9cda3f6f84675b7c9b26868e4d4a5399951468
Parents: e2844e0
Author: jbertram <jbertram@apache.com>
Authored: Tue Nov 29 10:55:53 2016 -0600
Committer: jbertram <jbertram@apache.com>
Committed: Tue Nov 29 10:56:16 2016 -0600

----------------------------------------------------------------------
 .../cli/commands/address/CreateAddress.java     |  3 ---
 .../AnycastRoutingWithClusterTest.java          | 10 ++++-----
 .../cluster/distribution/ClusterTestBase.java   | 22 +++++++++++++++++++-
 3 files changed, 26 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4e9cda3f/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
index 05df14b..42f721a 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
@@ -17,9 +17,6 @@
 
 package org.apache.activemq.artemis.cli.commands.address;
 
-import java.util.HashSet;
-import java.util.Set;
-
 import io.airlift.airline.Command;
 import io.airlift.airline.Option;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4e9cda3f/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
index ba7ddd4..6fda0ac 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/AnycastRoutingWithClusterTest.java
@@ -57,7 +57,7 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
       for (int i = 0; i < 3; i++) {
          createAddressInfo(i, address, RoutingType.ANYCAST, -1, false);
          setupSessionFactory(i, isNetty());
-         createQueue(i, address, queueName, null, false);
+         createQueue(i, address, queueName, null, false, RoutingType.ANYCAST);
          addConsumer(i, i, queueName, null);
       }
 
@@ -118,7 +118,7 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
       for (int i = 0; i < 3; i++) {
          createAddressInfo(i, address, RoutingType.ANYCAST, -1, false);
          setupSessionFactory(i, isNetty());
-         createQueue(i, address, queueNamePrefix + i, null, false);
+         createQueue(i, address, queueNamePrefix + i, null, false, RoutingType.ANYCAST);
          addConsumer(i, i, queueNamePrefix + i, null);
       }
 
@@ -184,9 +184,9 @@ public class AnycastRoutingWithClusterTest extends ClusterTestBase {
       String filter1 = "giraffe";
       String filter2 = "platypus";
 
-      createQueue(0, address, queueNamePrefix + 0, filter1, false);
-      createQueue(1, address, queueNamePrefix + 1, filter1, false);
-      createQueue(2, address, queueNamePrefix + 2, filter2, false);
+      createQueue(0, address, queueNamePrefix + 0, filter1, false, RoutingType.ANYCAST);
+      createQueue(1, address, queueNamePrefix + 1, filter1, false, RoutingType.ANYCAST);
+      createQueue(2, address, queueNamePrefix + 2, filter2, false, RoutingType.ANYCAST);
 
       for (int i = 0; i < 3; i++) {
          addConsumer(i, i, queueNamePrefix + i, null);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4e9cda3f/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
index 49482d8..e3a39f2 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java
@@ -497,8 +497,28 @@ public abstract class ClusterTestBase extends ActiveMQTestBase {
                               final String queueName,
                               final String filterVal,
                               final boolean durable,
+                              RoutingType routingType) throws Exception {
+      createQueue(node, address, queueName, filterVal, durable, null, null, routingType);
+   }
+
+   protected void createQueue(final int node,
+                              final String address,
+                              final String queueName,
+                              final String filterVal,
+                              final boolean durable,
                               final String user,
                               final String password) throws Exception {
+      createQueue(node, address, queueName, filterVal, durable, user, password, RoutingType.MULTICAST);
+   }
+
+   protected void createQueue(final int node,
+                              final String address,
+                              final String queueName,
+                              final String filterVal,
+                              final boolean durable,
+                              final String user,
+                              final String password,
+                              RoutingType routingType) throws Exception {
       ClientSessionFactory sf = sfs[node];
 
       if (sf == null) {
@@ -515,7 +535,7 @@ public abstract class ClusterTestBase extends ActiveMQTestBase {
 
       log.info("Creating " + queueName + " , address " + address + " on " + servers[node]);
 
-      session.createQueue(address, queueName, filterString, durable);
+      session.createQueue(address, routingType, queueName, filterString, durable);
 
       session.close();
    }


Mime
View raw message