activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/6] activemq-artemis git commit: ARTEMIS-19 allow disabling of message load-balancing
Date Wed, 03 Jun 2015 23:30:17 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 43470f38d -> 4b5bf5cc5


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/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 17f9fb6..dacc488 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
@@ -28,6 +28,7 @@ import org.apache.activemq.artemis.core.config.ScaleDownConfiguration;
 import org.apache.activemq.artemis.core.config.ha.LiveOnlyPolicyConfiguration;
 import org.apache.activemq.artemis.core.postoffice.Binding;
 import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.tests.integration.cluster.distribution.ClusterTestBase;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
@@ -78,8 +79,8 @@ public class ScaleDownTest extends ClusterTestBase
          haPolicyConfiguration0.getScaleDownConfiguration().setGroupName("bill");
          haPolicyConfiguration1.getScaleDownConfiguration().setGroupName("bill");
       }
-      setupClusterConnection("cluster0", "testAddress", false, 1, isNetty(), 0, 1);
-      setupClusterConnection("cluster0", "testAddress", false, 1, isNetty(), 1, 0);
+      setupClusterConnection("cluster0", "testAddress", MessageLoadBalancingType.ON_DEMAND,
1, isNetty(), 0, 1);
+      setupClusterConnection("cluster0", "testAddress", MessageLoadBalancingType.ON_DEMAND,
1, isNetty(), 1, 0);
       haPolicyConfiguration0.getScaleDownConfiguration().getConnectors().addAll(servers[0].getConfiguration().getClusterConfigurations().iterator().next().getStaticConnectors());
       haPolicyConfiguration1.getScaleDownConfiguration().getConnectors().addAll(servers[1].getConfiguration().getClusterConfigurations().iterator().next().getStaticConnectors());
       startServers(0, 1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/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 dd4cd80..bf15ee5 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
@@ -25,6 +25,7 @@ import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
 import org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.jms.server.config.impl.JMSConfigurationImpl;
 import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
@@ -191,7 +192,13 @@ public class JMSClusteredTestBase extends ActiveMQTestBase
                                                .setRetryInterval(1000)
                                                .setMaxHops(MAX_HOPS)
                                                .setConfirmationWindowSize(1024)
-                                               .setStaticConnectors(new ArrayList<String>()
{ { add(destinationLabel); } } ));
+                                               .setMessageLoadBalancingType(MessageLoadBalancingType.ON_DEMAND)
+                                               .setStaticConnectors(new ArrayList<String>()
+                                               {
+                                                  {
+                                                     add(destinationLabel);
+                                                  }
+                                               }));
 
       return configuration;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/20326d0d/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java
----------------------------------------------------------------------
diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java
index c4a5f7b..1606686 100644
--- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java
+++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.postoffice.Binding;
@@ -230,7 +231,7 @@ public class WildcardAddressManagerUnitTest extends ActiveMQTestBase
       }
 
       @Override
-      public void setRouteWhenNoConsumers(boolean takePriorityIntoAccount)
+      public void setMessageLoadBalancingType(MessageLoadBalancingType messageLoadBalancingType)
       {
 
       }


Mime
View raw message