use of org.apache.activemq.artemis.core.server.cluster.ha.ReplicatedPolicy in project activemq-artemis by apache.
the class HAPolicyConfigurationTest method ReplicatedTest.
@Test
public void ReplicatedTest() throws Exception {
Configuration configuration = createConfiguration("replicated-hapolicy-config.xml");
ActiveMQServerImpl server = new ActiveMQServerImpl(configuration);
try {
server.start();
Activation activation = server.getActivation();
assertTrue(activation instanceof SharedNothingLiveActivation);
HAPolicy haPolicy = server.getHAPolicy();
assertTrue(haPolicy instanceof ReplicatedPolicy);
ReplicatedPolicy replicatedPolicy = (ReplicatedPolicy) haPolicy;
assertEquals(replicatedPolicy.getGroupName(), "purple");
assertTrue(replicatedPolicy.isCheckForLiveServer());
assertEquals(replicatedPolicy.getClusterName(), "abcdefg");
assertEquals(replicatedPolicy.getInitialReplicationSyncTimeout(), 9876);
} finally {
server.stop();
}
}
Aggregations