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/07/01 12:34:07 UTC

[activemq-artemis] 02/03: ARTEMIS-2797 Logging redeployment errors and speeding RedeployTest

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 257d353896006ff3713eece6789345f55feb43a3
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Tue Jun 30 22:44:37 2020 -0400

    ARTEMIS-2797 Logging redeployment errors and speeding RedeployTest
---
 .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java       | 6 +++++-
 .../src/test/resources/reload-queue-filter-removed.xml              | 1 +
 .../src/test/resources/reload-queue-filter-updated-empty.xml        | 2 ++
 .../src/test/resources/reload-queue-filter-updated.xml              | 1 +
 tests/integration-tests/src/test/resources/reload-queue-filter.xml  | 1 +
 5 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index b4d7245..79b9c7d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -4003,7 +4003,11 @@ public class ActiveMQServerImpl implements ActiveMQServer {
             }
          }
          for (final SimpleString divertName : divertsToRemove) {
-            destroyDivert(divertName);
+            try {
+               destroyDivert(divertName);
+            } catch (Throwable e) {
+               logger.warn("Divert " + divertName + " could not be removed", e);
+            }
          }
 
          ActiveMQServerLogger.LOGGER.reloadingConfiguration("addresses");
diff --git a/tests/integration-tests/src/test/resources/reload-queue-filter-removed.xml b/tests/integration-tests/src/test/resources/reload-queue-filter-removed.xml
index 150316c..416a4ca 100644
--- a/tests/integration-tests/src/test/resources/reload-queue-filter-removed.xml
+++ b/tests/integration-tests/src/test/resources/reload-queue-filter-removed.xml
@@ -25,6 +25,7 @@ under the License.
    <core xmlns="urn:activemq:core">
       <security-enabled>false</security-enabled>
       <persistence-enabled>false</persistence-enabled>
+      <configuration-file-refresh-period>100</configuration-file-refresh-period>
 
       <acceptors>
          <acceptor name="artemis">tcp://0.0.0.0:61616</acceptor>
diff --git a/tests/integration-tests/src/test/resources/reload-queue-filter-updated-empty.xml b/tests/integration-tests/src/test/resources/reload-queue-filter-updated-empty.xml
index c998aab..7308bd6 100644
--- a/tests/integration-tests/src/test/resources/reload-queue-filter-updated-empty.xml
+++ b/tests/integration-tests/src/test/resources/reload-queue-filter-updated-empty.xml
@@ -25,6 +25,8 @@ under the License.
    <core xmlns="urn:activemq:core">
       <security-enabled>false</security-enabled>
       <persistence-enabled>false</persistence-enabled>
+      <configuration-file-refresh-period>100</configuration-file-refresh-period>
+      <configuration-file-refresh-period>100</configuration-file-refresh-period>
 
       <acceptors>
          <acceptor name="artemis">tcp://0.0.0.0:61616</acceptor>
diff --git a/tests/integration-tests/src/test/resources/reload-queue-filter-updated.xml b/tests/integration-tests/src/test/resources/reload-queue-filter-updated.xml
index 7b37d54..257d560 100644
--- a/tests/integration-tests/src/test/resources/reload-queue-filter-updated.xml
+++ b/tests/integration-tests/src/test/resources/reload-queue-filter-updated.xml
@@ -25,6 +25,7 @@ under the License.
    <core xmlns="urn:activemq:core">
       <security-enabled>false</security-enabled>
       <persistence-enabled>false</persistence-enabled>
+      <configuration-file-refresh-period>100</configuration-file-refresh-period>
 
       <acceptors>
          <acceptor name="artemis">tcp://0.0.0.0:61616</acceptor>
diff --git a/tests/integration-tests/src/test/resources/reload-queue-filter.xml b/tests/integration-tests/src/test/resources/reload-queue-filter.xml
index 816f547..d357e4e 100644
--- a/tests/integration-tests/src/test/resources/reload-queue-filter.xml
+++ b/tests/integration-tests/src/test/resources/reload-queue-filter.xml
@@ -25,6 +25,7 @@ under the License.
    <core xmlns="urn:activemq:core">
       <security-enabled>false</security-enabled>
       <persistence-enabled>false</persistence-enabled>
+      <configuration-file-refresh-period>100</configuration-file-refresh-period>
 
       <acceptors>
          <acceptor name="artemis">tcp://0.0.0.0:61616</acceptor>