Search in sources :

Example 26 with CPSubsystemConfig

use of com.hazelcast.config.cp.CPSubsystemConfig in project hazelcast by hazelcast.

the class CPConfigCheckerTest method whenGroupSize_even.

@Test(expected = IllegalArgumentException.class)
public void whenGroupSize_even() {
    Config config = new Config();
    CPSubsystemConfig cpSubsystemConfig = config.getCPSubsystemConfig();
    cpSubsystemConfig.setGroupSize(4);
}
Also used : Config(com.hazelcast.config.Config) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) ConfigValidator.checkCPSubsystemConfig(com.hazelcast.internal.config.ConfigValidator.checkCPSubsystemConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) ConfigValidator.checkCPSubsystemConfig(com.hazelcast.internal.config.ConfigValidator.checkCPSubsystemConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 27 with CPSubsystemConfig

use of com.hazelcast.config.cp.CPSubsystemConfig in project hazelcast by hazelcast.

the class UnsafeSemaphoreAdvancedTest method createConfig.

private Config createConfig() {
    Config config = new Config();
    CPSubsystemConfig cpSubsystemConfig = config.getCPSubsystemConfig();
    cpSubsystemConfig.setSessionTimeToLiveSeconds(10);
    cpSubsystemConfig.setSessionHeartbeatIntervalSeconds(1);
    SemaphoreConfig semaphoreConfig = new SemaphoreConfig();
    semaphoreConfig.setName(objectName);
    cpSubsystemConfig.addSemaphoreConfig(semaphoreConfig);
    return config;
}
Also used : Config(com.hazelcast.config.Config) SemaphoreConfig(com.hazelcast.config.cp.SemaphoreConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) SemaphoreConfig(com.hazelcast.config.cp.SemaphoreConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig)

Example 28 with CPSubsystemConfig

use of com.hazelcast.config.cp.CPSubsystemConfig in project hazelcast by hazelcast.

the class RaftInvocationFailureTest method createConfig.

@Override
protected Config createConfig(int cpNodeCount, int groupSize) {
    Config config = super.createConfig(cpNodeCount, groupSize);
    CPSubsystemConfig cpSubsystemConfig = config.getCPSubsystemConfig();
    cpSubsystemConfig.setFailOnIndeterminateOperationState(true);
    return config;
}
Also used : CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) Config(com.hazelcast.config.Config) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig)

Aggregations

CPSubsystemConfig (com.hazelcast.config.cp.CPSubsystemConfig)28 Config (com.hazelcast.config.Config)18 QuickTest (com.hazelcast.test.annotation.QuickTest)16 Test (org.junit.Test)16 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)15 ConfigValidator.checkCPSubsystemConfig (com.hazelcast.internal.config.ConfigValidator.checkCPSubsystemConfig)12 SemaphoreConfig (com.hazelcast.config.cp.SemaphoreConfig)8 FencedLockConfig (com.hazelcast.config.cp.FencedLockConfig)5 RaftAlgorithmConfig (com.hazelcast.config.cp.RaftAlgorithmConfig)4 File (java.io.File)4 KerberosAuthenticationConfig (com.hazelcast.config.security.KerberosAuthenticationConfig)3 KerberosIdentityConfig (com.hazelcast.config.security.KerberosIdentityConfig)3 LdapAuthenticationConfig (com.hazelcast.config.security.LdapAuthenticationConfig)3 RealmConfig (com.hazelcast.config.security.RealmConfig)3 SimpleAuthenticationConfig (com.hazelcast.config.security.SimpleAuthenticationConfig)3 TokenIdentityConfig (com.hazelcast.config.security.TokenIdentityConfig)2 File.createTempFile (java.io.File.createTempFile)2 CPSubsystemConfigChecker (com.hazelcast.config.ConfigCompatibilityChecker.CPSubsystemConfigChecker)1 PersistenceConfig (com.hazelcast.config.PersistenceConfig)1 JaasAuthenticationConfig (com.hazelcast.config.security.JaasAuthenticationConfig)1