diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java index ebf198869b..357c22b0c3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java @@ -155,7 +155,6 @@ public class ClusterConnectionBridge extends BridgeImpl if (factory == null) { - ActiveMQServerLogger.LOGGER.nodeNotAvailable(targetNodeID); return null; } factory.setReconnectAttempts(0); diff --git a/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java b/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java index 29f54c3207..147f65b6f1 100644 --- a/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java +++ b/examples/jms/colocated-failover-scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaleDownExample.java @@ -97,7 +97,8 @@ public class ColocatedFailoverScaleDownExample // Step 7. Crash server #0, the live server, and wait a little while to make sure // it has really crashed ServerUtil.killServer(server0); - Thread.sleep(5000); + System.out.println("Waiting for scale-down to complete..."); + Thread.sleep(10000); // Step 8. start the connection ready to receive messages connection1.start(); diff --git a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java index ad62419bf8..c5bb765c46 100644 --- a/examples/jms/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java +++ b/examples/jms/colocated-failover/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverExample.java @@ -97,6 +97,7 @@ public class ColocatedFailoverExample // Step 7. Crash server #0, the live server, and wait a little while to make sure // it has really crashed ServerUtil.killServer(server0); + Thread.sleep(10000); // Step 8. start the connection ready to receive messages connection.start(); diff --git a/examples/jms/colocated-failover/src/main/resources/activemq/server0/broker.xml b/examples/jms/colocated-failover/src/main/resources/activemq/server0/broker.xml index b38d7647fe..0a4103fe52 100644 --- a/examples/jms/colocated-failover/src/main/resources/activemq/server0/broker.xml +++ b/examples/jms/colocated-failover/src/main/resources/activemq/server0/broker.xml @@ -89,7 +89,9 @@ under the License. true - + + true + diff --git a/examples/jms/colocated-failover/src/main/resources/activemq/server1/broker.xml b/examples/jms/colocated-failover/src/main/resources/activemq/server1/broker.xml index f0dd08894b..8083f2760b 100644 --- a/examples/jms/colocated-failover/src/main/resources/activemq/server1/broker.xml +++ b/examples/jms/colocated-failover/src/main/resources/activemq/server1/broker.xml @@ -86,8 +86,12 @@ under the License. 2000 1 true - - + + true + + + true + diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java index fdd446a094..1f13b201cd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/CoreMessagingProxy.java @@ -94,13 +94,20 @@ public class CoreMessagingProxy ClientMessage m = session.createMessage(false); ManagementHelper.putOperationInvocation(m, resourceName, operationName, args); ClientMessage reply = requestor.request(m); - if (ManagementHelper.hasOperationSucceeded(reply)) + if (reply != null) { - return ManagementHelper.getResult(reply); + if (ManagementHelper.hasOperationSucceeded(reply)) + { + return ManagementHelper.getResult(reply); + } + else + { + throw new Exception((String) ManagementHelper.getResult(reply)); + } } else { - throw new Exception((String)ManagementHelper.getResult(reply)); + return null; } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java index fd802ec1c0..36a2308153 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java @@ -111,6 +111,12 @@ public class MQTTTestSupport extends ActiveMQTestBase @After public void tearDown() throws Exception { + System.clearProperty("javax.net.ssl.trustStore"); + System.clearProperty("javax.net.ssl.trustStorePassword"); + System.clearProperty("javax.net.ssl.trustStoreType"); + System.clearProperty("javax.net.ssl.keyStore"); + System.clearProperty("javax.net.ssl.keyStorePassword"); + System.clearProperty("javax.net.ssl.keyStoreType"); stopBroker(); }