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-945 - fix test and queue delete
Date Tue, 07 Feb 2017 14:48:43 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 0df002597 -> 8c77e2516


ARTEMIS-945 - fix test and queue delete

https://issues.apache.org/jira/browse/ARTEMIS-945


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

Branch: refs/heads/master
Commit: d937e8a8e1302521e576a8c23bbba3d2dec21a7f
Parents: 0df0025
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Tue Feb 7 09:27:58 2017 +0000
Committer: Andy Taylor <andy.tayls67@gmail.com>
Committed: Tue Feb 7 14:01:15 2017 +0000

----------------------------------------------------------------------
 .../activemq/artemis/core/server/impl/QueueManagerImpl.java   | 7 +++++++
 .../activemq/artemis/tests/integration/amqp/ProtonTest.java   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d937e8a8/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
index 692eba7..82a700f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
@@ -34,6 +34,13 @@ public class QueueManagerImpl implements QueueManager {
       @Override
       public void run() {
          Queue queue = server.locateQueue(queueName);
+         //the queue may already have been deleted and this is a result of that
+         if (queue == null) {
+            if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) {
+               ActiveMQServerLogger.LOGGER.debug("pno queue to delete \"" + queueName + ".\"");
+            }
+            return;
+         }
          SimpleString address = queue.getAddress();
          AddressSettings settings = server.getAddressSettingsRepository().getMatch(address.toString());
          long consumerCount = queue.getConsumerCount();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d937e8a8/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/ProtonTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/ProtonTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/ProtonTest.java
index b790f0e..7bba91f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/ProtonTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/ProtonTest.java
@@ -830,7 +830,7 @@ public class ProtonTest extends ProtonTestBase {
          Wait.waitFor(new Wait.Condition() {
             @Override
             public boolean isSatisfied() throws Exception {
-               return amqpConnection.isClosed();
+               return receiver.isClosed();
             }
          });
          assertTrue(receiver.isClosed());


Mime
View raw message