Search in sources :

Example 1 with ConfigCheck

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);
}
Also used : ConfigCheck(com.hazelcast.internal.cluster.impl.ConfigCheck) Config(com.hazelcast.config.Config) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 2 with ConfigCheck

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);
}
Also used : ConfigCheck(com.hazelcast.internal.cluster.impl.ConfigCheck) Config(com.hazelcast.config.Config) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 3 with ConfigCheck

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);
}
Also used : ConfigCheck(com.hazelcast.internal.cluster.impl.ConfigCheck) Config(com.hazelcast.config.Config) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 4 with ConfigCheck

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);
}
Also used : ConfigCheck(com.hazelcast.internal.cluster.impl.ConfigCheck) Config(com.hazelcast.config.Config) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 5 with ConfigCheck

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);
}
Also used : ConfigCheck(com.hazelcast.internal.cluster.impl.ConfigCheck) Config(com.hazelcast.config.Config) PartitionGroupConfig(com.hazelcast.config.PartitionGroupConfig) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

Config (com.hazelcast.config.Config)7 PartitionGroupConfig (com.hazelcast.config.PartitionGroupConfig)7 ConfigCheck (com.hazelcast.internal.cluster.impl.ConfigCheck)7 ParallelTest (com.hazelcast.test.annotation.ParallelTest)7 QuickTest (com.hazelcast.test.annotation.QuickTest)7 Test (org.junit.Test)7