From ecb9d462cedc2aea002cb49c6cecd4b80c5f93e2 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Thu, 10 May 2018 10:44:30 -0500 Subject: [PATCH] ARTEMIS-1851 avoid exception in isReplicaSync() --- .../artemis/core/server/impl/ActiveMQServerImpl.java | 2 +- .../integration/management/ActiveMQServerControlTest.java | 5 +++++ 2 files changed, 6 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 3a2e91cfff..cb31b0069c 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 @@ -946,7 +946,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { } else if (activation instanceof SharedNothingBackupActivation) { return ((SharedNothingBackupActivation) activation).isRemoteBackupUpToDate(); } else { - throw ActiveMQMessageBundle.BUNDLE.methodNotApplicable(); + return false; } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java index d290ec2e18..cdf7a08c41 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java @@ -179,6 +179,11 @@ public class ActiveMQServerControlTest extends ManagementTestBase { Assert.assertEquals(connectorConfig.getName(), config[0]); } + @Test + public void testIsReplicaSync() throws Exception { + Assert.assertFalse(createManagementControl().isReplicaSync()); + } + @Test public void testGetConnectorsAsJSON() throws Exception { ActiveMQServerControl serverControl = createManagementControl();