activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [18/55] [abbrv] activemq-artemis git commit: Stomp refactor + track autocreation for addresses
Date Wed, 07 Dec 2016 18:18:21 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/58934fed/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java
index edf0397..30fdfd4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/JMSClusteredTestBase.java
@@ -169,11 +169,24 @@ public class JMSClusteredTestBase extends ActiveMQTestBase {
       final String destinationLabel = "toServer" + destination;
       final String sourceLabel = "server" + source;
 
-      Configuration configuration = createDefaultInVMConfig(source).setSecurityEnabled(false).setJMXManagementEnabled(true).setPersistenceEnabled(false).addConnectorConfiguration(destinationLabel,
new TransportConfiguration(InVMConnectorFactory.class.getName(), generateInVMParams(destination))).addConnectorConfiguration(sourceLabel,
new TransportConfiguration(InVMConnectorFactory.class.getName(), generateInVMParams(source))).addClusterConfiguration(new
ClusterConnectionConfiguration().setName(destinationLabel).setAddress("jms").setConnectorName(sourceLabel).setRetryInterval(250).setMaxHops(MAX_HOPS).setConfirmationWindowSize(1024).setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND).setStaticConnectors(new
ArrayList<String>() {
-         {
-            add(destinationLabel);
-         }
-      }));
+      Configuration configuration = createDefaultInVMConfig(source).setSecurityEnabled(false)
+                                                                   .setJMXManagementEnabled(true)
+                                                                   .setPersistenceEnabled(false)
+                                                                   .addConnectorConfiguration(destinationLabel,
new TransportConfiguration(InVMConnectorFactory.class.getName(), generateInVMParams(destination)))
+                                                                   .addConnectorConfiguration(sourceLabel,
new TransportConfiguration(InVMConnectorFactory.class.getName(), generateInVMParams(source)))
+                                                                   .addClusterConfiguration(new
ClusterConnectionConfiguration().setName(destinationLabel)
+                                                                                        
                                       // TODO should this be changed?
+                                                                                        
                                       .setAddress("jms")
+                                                                                        
                                       .setConnectorName(sourceLabel)
+                                                                                        
                                       .setRetryInterval(250)
+                                                                                        
                                       .setMaxHops(MAX_HOPS)
+                                                                                        
                                       .setConfirmationWindowSize(1024)
+                                                                                        
                                       .setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND)
+                                                                                        
                                       .setStaticConnectors(new ArrayList<String>()
{
+                                                                                        
                                          {
+                                                                                        
                                             add(destinationLabel);
+                                                                                        
                                          }
+                                                                                        
                                       }));
 
       configuration.getAddressesSettings().put("#", new AddressSettings().setRedistributionDelay(0));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/58934fed/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java
b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java
index da171cb..fc97cd4 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java
@@ -340,6 +340,7 @@ public class MessageProducerTest extends JMSTestCase {
    @Test
    public void testCreateProducerOnInexistentDestination() throws Exception {
       getJmsServer().getAddressSettingsRepository().addMatch("#", new AddressSettings().setAutoCreateJmsQueues(false));
+      getJmsServer().getAddressSettingsRepository().addMatch("#", new AddressSettings().setAutoCreateJmsTopics(false));
       Connection pconn = createConnection();
       try {
          Session ps = pconn.createSession(false, Session.AUTO_ACKNOWLEDGE);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/58934fed/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java
----------------------------------------------------------------------
diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java
b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java
index 016b052..1ff79d0 100644
--- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java
+++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java
@@ -170,6 +170,7 @@ public class SessionTest extends ActiveMQServerTestCase {
    @Test
    public void testCreateNonExistentTopic() throws Exception {
       getJmsServer().getAddressSettingsRepository().addMatch("#", new AddressSettings().setAutoCreateJmsQueues(false));
+      getJmsServer().getAddressSettingsRepository().addMatch("#", new AddressSettings().setAutoCreateJmsTopics(false));
       Connection conn = getConnectionFactory().createConnection();
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
       try {
@@ -198,6 +199,7 @@ public class SessionTest extends ActiveMQServerTestCase {
    @Test
    public void testCreateTopicWhileQueueWithSameNameExists() throws Exception {
       getJmsServer().getAddressSettingsRepository().addMatch("#", new AddressSettings().setAutoCreateJmsQueues(false));
+      getJmsServer().getAddressSettingsRepository().addMatch("#", new AddressSettings().setAutoCreateJmsTopics(false));
       Connection conn = getConnectionFactory().createConnection();
       Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
       try {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/58934fed/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 994c1a6..f8b7153 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
@@ -1125,7 +1125,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase {
       }
 
       @Override
-      public void createAddress(SimpleString address, boolean multicast) throws ActiveMQException
{
+      public void createAddress(SimpleString address, boolean multicast, final boolean autoCreated)
throws ActiveMQException {
 
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/58934fed/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
index 512f0f2..35fe5cc 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java
@@ -30,7 +30,6 @@ import org.apache.activemq.artemis.core.postoffice.RoutingStatus;
 import org.apache.activemq.artemis.core.postoffice.impl.DuplicateIDCacheImpl;
 import org.apache.activemq.artemis.core.server.MessageReference;
 import org.apache.activemq.artemis.core.server.Queue;
-import org.apache.activemq.artemis.core.server.QueueCreator;
 import org.apache.activemq.artemis.core.server.RoutingContext;
 import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
@@ -162,7 +161,6 @@ public class FakePostOffice implements PostOffice {
 
    @Override
    public RoutingStatus route(ServerMessage message,
-                              QueueCreator creator,
                               RoutingContext context,
                               boolean direct) throws Exception {
       return RoutingStatus.OK;
@@ -171,7 +169,6 @@ public class FakePostOffice implements PostOffice {
 
    @Override
    public RoutingStatus route(ServerMessage message,
-                              QueueCreator creator,
                               Transaction tx,
                               boolean direct) throws Exception {
       return RoutingStatus.OK;
@@ -179,7 +176,6 @@ public class FakePostOffice implements PostOffice {
 
    @Override
    public RoutingStatus route(ServerMessage message,
-                              QueueCreator creator,
                               RoutingContext context,
                               boolean direct,
                               boolean rejectDuplicates) throws Exception {
@@ -189,7 +185,6 @@ public class FakePostOffice implements PostOffice {
 
    @Override
    public RoutingStatus route(ServerMessage message,
-                              QueueCreator creator,
                               Transaction tx,
                               boolean direct,
                               boolean rejectDuplicates) throws Exception {
@@ -201,7 +196,7 @@ public class FakePostOffice implements PostOffice {
    }
 
    @Override
-   public RoutingStatus route(ServerMessage message, QueueCreator queueCreator, boolean direct)
throws Exception {
+   public RoutingStatus route(ServerMessage message, boolean direct) throws Exception {
       return RoutingStatus.OK;
    }
 }


Mime
View raw message