You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2020/10/30 02:10:00 UTC

[activemq-artemis] branch master updated (caddd4f -> 981b516)

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git.


    from caddd4f  This closes #3322
     new 4801979  ARTEMIS-2967 Adding testSimpleConnect back and fixing a possible NPE
     new 981b516  ARTEMIS-2968 Ignoring expected exception when deleting a previously already removed queue

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../artemis/protocol/amqp/connect/AMQPBrokerConnection.java   |  8 +++++---
 .../amqp/connect/mirror/AMQPMirrorControllerTarget.java       |  7 ++++++-
 .../tests/integration/amqp/connect/AMQPBridgeTest.java        | 11 +++++++++++
 3 files changed, 22 insertions(+), 4 deletions(-)


[activemq-artemis] 01/02: ARTEMIS-2967 Adding testSimpleConnect back and fixing a possible NPE

Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 480197975b34d0048b273624915bc4fbfb2f2933
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Thu Oct 29 22:01:01 2020 -0400

    ARTEMIS-2967 Adding testSimpleConnect back and fixing a possible NPE
---
 .../artemis/protocol/amqp/connect/AMQPBrokerConnection.java   |  8 +++++---
 .../tests/integration/amqp/connect/AMQPBridgeTest.java        | 11 +++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java
index 39fa196..fadf64f 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java
@@ -154,9 +154,11 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
       server.getConfiguration().registerBrokerPlugin(this);
       try {
 
-         for (AMQPBrokerConnectionElement connectionElement : brokerConnectConfiguration.getConnectionElements()) {
-            if (connectionElement.getType() == AMQPBrokerConnectionAddressType.MIRROR) {
-               installMirrorController((AMQPMirrorBrokerConnectionElement)connectionElement, server);
+         if (brokerConnectConfiguration != null && brokerConnectConfiguration.getConnectionElements() != null) {
+            for (AMQPBrokerConnectionElement connectionElement : brokerConnectConfiguration.getConnectionElements()) {
+               if (connectionElement.getType() == AMQPBrokerConnectionAddressType.MIRROR) {
+                  installMirrorController((AMQPMirrorBrokerConnectionElement) connectionElement, server);
+               }
             }
          }
       } catch (Throwable e) {
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPBridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPBridgeTest.java
index e4b7fbe..085c570 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPBridgeTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/connect/AMQPBridgeTest.java
@@ -55,6 +55,17 @@ public class AMQPBridgeTest extends AmqpClientTestSupport {
    }
 
    @Test
+   public void testsSimpleConnect() throws Exception {
+      server.start();
+      server_2 = createServer(AMQP_PORT_2, false);
+
+      AMQPBrokerConnectConfiguration amqpConnection = new AMQPBrokerConnectConfiguration("test", "tcp://localhost:" + AMQP_PORT);
+      server_2.getConfiguration().addAMQPConnection(amqpConnection);
+
+      server_2.start();
+   }
+
+   @Test
    public void testSimpleTransferPush() throws Exception {
       internalTransferPush("TEST", false);
    }


[activemq-artemis] 02/02: ARTEMIS-2968 Ignoring expected exception when deleting a previously already removed queue

Posted by cl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit 981b516479947cb4b2878ceb4b4dacc82a6c02fa
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Thu Oct 29 22:04:33 2020 -0400

    ARTEMIS-2968 Ignoring expected exception when deleting a previously already removed queue
---
 .../protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java
index 88333b3..9f26f57 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AMQPMirrorControllerTarget.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import java.util.function.ToLongFunction;
 import java.util.stream.Stream;
 
+import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
 import org.apache.activemq.artemis.api.core.Message;
 import org.apache.activemq.artemis.api.core.QueueConfiguration;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -276,7 +277,11 @@ public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implement
       if (logger.isDebugEnabled()) {
          logger.debug("destroy queue " + queueName + " on address = " + addressName);
       }
-      server.destroyQueue(queueName);
+      try {
+         server.destroyQueue(queueName);
+      } catch (ActiveMQNonExistentQueueException expected) {
+         logger.debug("queue " + queueName + " was previously removed", expected);
+      }
    }
 
    private static ToLongFunction<MessageReference> referenceIDSupplier = (source) -> {