activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [1/3] activemq-artemis git commit: ARTEMIS-878 Fix compilation and tests
Date Fri, 16 Dec 2016 15:05:33 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 749db2596 -> be38f4dd4


ARTEMIS-878 Fix compilation and 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/03cc566c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/03cc566c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/03cc566c

Branch: refs/heads/master
Commit: 03cc566c5d79e7f766126dcdd99a934c65c9a3b2
Parents: 749db25
Author: Francesco Nigro <nigro.fra@gmail.com>
Authored: Fri Dec 16 15:26:00 2016 +0100
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Fri Dec 16 09:34:02 2016 -0500

----------------------------------------------------------------------
 .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java  | 2 +-
 .../artemis/tests/integration/cli/QueueCommandTest.java        | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03cc566c/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 60a6ffa..3decd14 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -469,7 +469,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
          final Queue queue = queueBinding.getQueue();
          //TODO put the whole update logic on Queue
          //validate update
-         if (maxConsumers != null) {
+         if (maxConsumers != null && maxConsumers.intValue() != Queue.MAX_CONSUMERS_UNLIMITED)
{
             final int consumerCount = queue.getConsumerCount();
             if (consumerCount > maxConsumers) {
                throw ActiveMQMessageBundle.BUNDLE.invalidMaxConsumersUpdate(name.toString(),
maxConsumers, consumerCount);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/03cc566c/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
index c254eed..d578154 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
@@ -257,7 +257,8 @@ public class QueueCommandTest extends JMSTestBase {
       final UpdateQueue updateQueue = new UpdateQueue();
       updateQueue.setName(queueName);
       updateQueue.setDeleteOnNoConsumers(newDeleteOnNoConsumers);
-      updateQueue.setRoutingType(newRoutingType.name());
+      updateQueue.setMulticast(newRoutingType.equals(RoutingType.MULTICAST));
+      updateQueue.setAnycast(newRoutingType.equals(RoutingType.ANYCAST));
       updateQueue.setMaxConsumers(newMaxConsumers);
       updateQueue.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error)));
 
@@ -286,7 +287,8 @@ public class QueueCommandTest extends JMSTestBase {
       final RoutingType newRoutingType = RoutingType.ANYCAST;
       final UpdateQueue updateQueue = new UpdateQueue();
       updateQueue.setName(queueName);
-      updateQueue.setRoutingType(newRoutingType.name());
+      updateQueue.setMulticast(newRoutingType.equals(RoutingType.MULTICAST));
+      updateQueue.setAnycast(newRoutingType.equals(RoutingType.ANYCAST));
       updateQueue.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error)));
 
       final String expectedErrorMessage = MessageFormat.format("Can''t update queue {0} with
routing type: {1}, Supported routing types for address: {2} are {3}", queueName, newRoutingType,
addressName, supportedRoutingTypes);


Mime
View raw message