ARTEMIS-1851 avoid exception in isReplicaSync()

This commit is contained in:
Justin Bertram 2018-05-10 10:44:30 -05:00 committed by Clebert Suconic
parent 82b5871cfd
commit ecb9d462ce
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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();