use of com.hazelcast.config.SplitBrainProtectionConfig in project hazelcast by hazelcast.
the class SplitBrainProtectionTest method givenSplitBrainProtectionFunctionInstanceConfigured_whenImplementsHazelcastInstanceAware_thenHazelcastInjectsItsInstance.
@Test
public void givenSplitBrainProtectionFunctionInstanceConfigured_whenImplementsHazelcastInstanceAware_thenHazelcastInjectsItsInstance() {
SplitBrainProtectionConfig splitBrainProtectionConfig = new SplitBrainProtectionConfig(randomString(), true).setFunctionImplementation(new HazelcastInstanceAwareSplitBrainProtectionFunction());
Config config = new Config().addSplitBrainProtectionConfig(splitBrainProtectionConfig);
HazelcastInstance instance = createHazelcastInstance(config);
assertEquals(instance, HazelcastInstanceAwareSplitBrainProtectionFunction.instance);
}
use of com.hazelcast.config.SplitBrainProtectionConfig in project hazelcast by hazelcast.
the class PartitionedCluster method createSuccessfulTestSplitBrainProtection.
private static SplitBrainProtectionConfig createSuccessfulTestSplitBrainProtection() {
SplitBrainProtectionConfig splitConfig = new SplitBrainProtectionConfig();
splitConfig.setEnabled(true);
splitConfig.setMinimumClusterSize(3);
splitConfig.setName(SUCCESSFUL_SPLIT_BRAIN_PROTECTION_TEST_NAME);
return splitConfig;
}
Aggregations