activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [43/55] [abbrv] activemq-artemis git commit: CreateAddress CLI work
Date Wed, 07 Dec 2016 18:18:46 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/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();
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
index f6ad723..dd8b7ce 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
@@ -49,6 +49,7 @@ import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionCre
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionReceiveMessage;
 import org.apache.activemq.artemis.core.protocol.core.impl.wireformat.SessionSendMessage;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
@@ -1052,7 +1053,7 @@ public class InterceptorTest extends ActiveMQTestBase {
    public void testInterceptorOnURI() throws Exception {
       locator.close();
 
-      server.createQueue(QUEUE, QUEUE, null, true, false);
+      server.createQueue(QUEUE, RoutingType.ANYCAST, QUEUE, null, true, false);
 
       String uri = "tcp://localhost:61616?incomingInterceptorList=" + Incoming.class.getCanonicalName()
+ "&outgoingInterceptorList=" + Outgoing.class.getName();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
index 37e55c0..7b6f7cf 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ActiveMQConnectionFactoryTest.java
@@ -45,6 +45,7 @@ import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfiguration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.integration.jms.serializables.TestClass1;
@@ -243,7 +244,7 @@ public class ActiveMQConnectionFactoryTest extends ActiveMQTestBase {
    private void testDeserializationOptions(boolean useJndi, boolean useBrowser) throws Exception
{
       String qname = "SerialTestQueue";
       SimpleString qaddr = new SimpleString(qname);
-      liveService.createQueue(qaddr, qaddr, null, true, false);
+      liveService.createQueue(qaddr, RoutingType.ANYCAST, qaddr, null, true, false);
 
       //default ok
       String blackList = null;
@@ -316,7 +317,7 @@ public class ActiveMQConnectionFactoryTest extends ActiveMQTestBase {
 
       String qname = "SerialTestQueue";
       SimpleString qaddr = new SimpleString(qname);
-      liveService.createQueue(qaddr, qaddr, null, true, false);
+      liveService.createQueue(qaddr, RoutingType.ANYCAST, qaddr, null, true, false);
 
       try {
          String blackList = null;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java
index 538260e..6f9e9fc 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java
@@ -43,6 +43,7 @@ import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
 import org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.NodeManager;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.core.server.impl.InVMNodeManager;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnection;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
@@ -133,7 +134,7 @@ public class JMSFailoverListenerTest extends ActiveMQTestBase {
 
       SimpleString jmsQueueName = new SimpleString("myqueue");
 
-      coreSession.createQueue(jmsQueueName, jmsQueueName, null, true);
+      coreSession.createQueue(jmsQueueName, RoutingType.ANYCAST, jmsQueueName, null, true);
 
       Queue queue = sess.createQueue("myqueue");
 
@@ -206,7 +207,7 @@ public class JMSFailoverListenerTest extends ActiveMQTestBase {
 
       SimpleString jmsQueueName = new SimpleString("myqueue");
 
-      coreSessionLive.createQueue(jmsQueueName, jmsQueueName, null, true);
+      coreSessionLive.createQueue(jmsQueueName, RoutingType.ANYCAST, jmsQueueName, null,
true);
 
       Queue queue = sessLive.createQueue("myqueue");
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
index 92741e7..da05fae 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java
@@ -39,6 +39,7 @@ import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 import org.apache.activemq.artemis.core.client.impl.ClientSessionInternal;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.jms.client.ActiveMQSession;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
@@ -100,7 +101,7 @@ public class JMSReconnectTest extends ActiveMQTestBase {
 
       SimpleString jmsQueueName = new SimpleString("myqueue");
 
-      coreSession.createQueue(jmsQueueName, jmsQueueName, null, true);
+      coreSession.createQueue(jmsQueueName, RoutingType.ANYCAST, jmsQueueName, null, true);
 
       Queue queue = sess.createQueue("myqueue");
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
index 193c58c..5e02ff8 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java
@@ -566,7 +566,7 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes
 
          @Override
          public void createAddress(@Parameter(name = "name", desc = "The name of the address")
String name,
-                                   @Parameter(name = "deliveryMode", desc = "The delivery
modes enabled for this address'") Object[] routingTypes) throws Exception {
+                                   @Parameter(name = "routingType", desc = "The delivery
modes enabled for this address'") Object[] routingTypes) throws Exception {
 
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
index 2829d80..21b2c6d 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java
@@ -833,7 +833,7 @@ public class SecurityTest extends ActiveMQTestBase {
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
       ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("auser", "pass");
-      Role role = new Role("arole", false, false, true, true, false, false, false, false,
false, false);
+      Role role = new Role("arole", false, false, true, true, false, false, false, false,
false, true);
       Set<Role> roles = new HashSet<>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);
@@ -923,7 +923,7 @@ public class SecurityTest extends ActiveMQTestBase {
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
       ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("auser", "pass");
-      Role role = new Role("arole", false, false, false, false, true, true, false, false,
false, false);
+      Role role = new Role("arole", false, false, false, false, true, true, false, false,
false, true);
       Set<Role> roles = new HashSet<>();
       roles.add(role);
       securityRepository.addMatch(SecurityTest.addressA, roles);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/QueueTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/QueueTest.java
b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/QueueTest.java
index f47dfb6..3f9e548 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/QueueTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/QueueTest.java
@@ -47,7 +47,7 @@ public class QueueTest extends JMSTestCase {
          conn.start();
 
          p.send(s.createTextMessage("payload"));
-         TextMessage m = (TextMessage) c.receive();
+         TextMessage m = (TextMessage) c.receive(5000);
 
          ProxyAssertSupport.assertEquals("payload", m.getText());
       } finally {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java
b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java
index 90b4d3e..71bc8a1 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java
@@ -275,7 +275,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase {
          propNames.add(propName);
       }
 
-      ProxyAssertSupport.assertEquals(9, propNames.size());
+      ProxyAssertSupport.assertTrue(propNames.size() >= 9);
 
       ProxyAssertSupport.assertTrue(propNames.contains("myBool"));
       ProxyAssertSupport.assertTrue(propNames.contains("myByte"));

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0a38e78e/tests/joram-tests/src/test/java/org/apache/activemq/artemis/common/AbstractAdmin.java
----------------------------------------------------------------------
diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/common/AbstractAdmin.java
b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/common/AbstractAdmin.java
index 8ea7828..2ada3be 100644
--- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/common/AbstractAdmin.java
+++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/common/AbstractAdmin.java
@@ -34,6 +34,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.api.core.management.ManagementHelper;
 import org.apache.activemq.artemis.api.core.management.ResourceNames;
 import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
+import org.apache.activemq.artemis.core.server.RoutingType;
 import org.apache.activemq.artemis.tests.util.SpawnedVMSupport;
 import org.objectweb.jtests.jms.admin.Admin;
 
@@ -119,7 +120,7 @@ public class AbstractAdmin implements Admin {
    public void createQueue(final String name) {
       Boolean result;
       try {
-         invokeSyncOperation(ResourceNames.BROKER, "createQueue", name, name);
+         invokeSyncOperation(ResourceNames.BROKER, "createQueue", name, RoutingType.ANYCAST.toString(),
name, null, true, ActiveMQDefaultConfiguration.getDefaultMaxQueueConsumers(), ActiveMQDefaultConfiguration.getDefaultDeleteQueueOnNoConsumers(),
true);
       } catch (Exception e) {
          throw new IllegalStateException(e);
       }


Mime
View raw message