use of com.hazelcast.config.PNCounterConfig in project hazelcast by hazelcast.
the class AbstractDynamicConfigGeneratorTest method testPNCounter.
// PN COUNTER
@Test
public void testPNCounter() {
PNCounterConfig expectedConfig = new PNCounterConfig().setName("testPNCounter").setReplicaCount(100).setSplitBrainProtectionName("splitBrainProtection");
Config config = new Config().addPNCounterConfig(expectedConfig);
Config decConfig = getNewConfigViaGenerator(config);
PNCounterConfig actualConfig = decConfig.getPNCounterConfig(expectedConfig.getName());
assertEquals(expectedConfig, actualConfig);
}
use of com.hazelcast.config.PNCounterConfig in project hazelcast by hazelcast.
the class PNCounterBasicIntegrationTest method setup.
@Before
public void setup() {
final PNCounterConfig counterConfig = new PNCounterConfig().setName("default").setReplicaCount(replicaCount).setStatisticsEnabled(true);
final Config config = new Config().setProperty(ClusterProperty.PARTITION_COUNT.getName(), "5").setCRDTReplicationConfig(new CRDTReplicationConfig().setReplicationPeriodMillis(200).setMaxConcurrentReplicationTargets(Integer.MAX_VALUE)).addPNCounterConfig(counterConfig);
final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
instances = factory.newInstances(config);
}
use of com.hazelcast.config.PNCounterConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method assertConfigurationsEqualOnAllMembers.
private void assertConfigurationsEqualOnAllMembers(PNCounterConfig config) {
String name = config.getName();
for (HazelcastInstance instance : members) {
PNCounterConfig registeredConfig = instance.getConfig().getPNCounterConfig(name);
assertEquals(config, registeredConfig);
}
}
Aggregations