use of com.hazelcast.internal.cluster.impl.ConfigCheck in project hazelcast by hazelcast.
the class ConfigCheckTest method whenGroupNameSameButPasswordDifferent_thenConfigMismatchException.
@Test
public void whenGroupNameSameButPasswordDifferent_thenConfigMismatchException() {
Config config1 = new Config();
config1.getGroupConfig().setName("group").setPassword("password1");
Config config2 = new Config();
config2.getGroupConfig().setName("group").setPassword("password2");
ConfigCheck configCheck1 = new ConfigCheck(config1, "joiner");
ConfigCheck configCheck2 = new ConfigCheck(config2, "joiner");
assertIsCompatibleThrowsConfigMismatchException(configCheck1, configCheck2);
}
use of com.hazelcast.internal.cluster.impl.ConfigCheck in project hazelcast by hazelcast.
the class ConfigCheckTest method whenDifferentPartitionCount_thenConfigurationMismatchException.
@Test
public void whenDifferentPartitionCount_thenConfigurationMismatchException() {
Config config1 = new Config();
config1.setProperty(GroupProperty.PARTITION_COUNT.getName(), "100");
Config config2 = new Config();
config2.setProperty(GroupProperty.PARTITION_COUNT.getName(), "200");
ConfigCheck configCheck1 = new ConfigCheck(config1, "joiner");
ConfigCheck configCheck2 = new ConfigCheck(config2, "joiner");
assertIsCompatibleThrowsConfigMismatchException(configCheck1, configCheck2);
}
use of com.hazelcast.internal.cluster.impl.ConfigCheck in project hazelcast by hazelcast.
the class ConfigCheckTest method whenGroupNameDifferent_thenFalse.
@Test
public void whenGroupNameDifferent_thenFalse() {
Config config1 = new Config();
config1.getGroupConfig().setName("foo");
Config config2 = new Config();
config2.getGroupConfig().setName("bar");
ConfigCheck configCheck1 = new ConfigCheck(config1, "joiner");
ConfigCheck configCheck2 = new ConfigCheck(config2, "joiner");
assertIsCompatibleFalse(configCheck1, configCheck2);
}
use of com.hazelcast.internal.cluster.impl.ConfigCheck in project hazelcast by hazelcast.
the class ConfigCheckTest method whenDifferentApplicationValidationToken_thenConfigurationMismatchException.
@Test
public void whenDifferentApplicationValidationToken_thenConfigurationMismatchException() {
Config config1 = new Config();
config1.setProperty(GroupProperty.APPLICATION_VALIDATION_TOKEN.getName(), "foo");
Config config2 = new Config();
config2.setProperty(GroupProperty.APPLICATION_VALIDATION_TOKEN.getName(), "bar");
ConfigCheck configCheck1 = new ConfigCheck(config1, "joiner");
ConfigCheck configCheck2 = new ConfigCheck(config2, "joiner");
assertIsCompatibleThrowsConfigMismatchException(configCheck1, configCheck2);
}
use of com.hazelcast.internal.cluster.impl.ConfigCheck in project hazelcast by hazelcast.
the class ConfigCheckTest method whenGroupPartitionEnabledMismatch_thenConfigurationMismatchException.
@Test
public void whenGroupPartitionEnabledMismatch_thenConfigurationMismatchException() {
Config config1 = new Config();
config1.getPartitionGroupConfig().setEnabled(false);
Config config2 = new Config();
config2.getPartitionGroupConfig().setEnabled(true);
ConfigCheck configCheck1 = new ConfigCheck(config1, "joiner");
ConfigCheck configCheck2 = new ConfigCheck(config2, "joiner");
assertIsCompatibleThrowsConfigMismatchException(configCheck1, configCheck2);
}
Aggregations