Search in sources :

Example 76 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class NodeExtensionTest method getConfig.

protected Config getConfig() {
    Config config = new Config();
    NetworkConfig networkConfig = config.getNetworkConfig();
    JoinConfig join = networkConfig.getJoin();
    join.getMulticastConfig().setEnabled(false);
    return config;
}
Also used : Config(com.hazelcast.config.Config) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig) NetworkConfig(com.hazelcast.config.NetworkConfig) JoinConfig(com.hazelcast.config.JoinConfig)

Example 77 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class MembershipFailureTest_withTCP method initConfig.

private static Config initConfig(Config config) {
    config.setProperty(ClusterProperty.WAIT_SECONDS_BEFORE_JOIN.getName(), "1");
    JoinConfig join = config.getNetworkConfig().getJoin();
    join.getMulticastConfig().setEnabled(false);
    TcpIpConfig tcpIpConfig = join.getTcpIpConfig().setEnabled(true).clear();
    for (int i = 0; i < 10; i++) {
        int port = 5701 + i;
        tcpIpConfig.addMember("127.0.0.1:" + port);
    }
    return config;
}
Also used : JoinConfig(com.hazelcast.config.JoinConfig) TcpIpConfig(com.hazelcast.config.TcpIpConfig)

Example 78 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class MulticastServiceTest method createConfig.

private Config createConfig(Boolean callSetInterface) {
    Config config = new Config();
    if (callSetInterface != null) {
        config.setProperty(ClusterProperty.MULTICAST_SOCKET_SET_INTERFACE.getName(), callSetInterface.toString());
    }
    JoinConfig joinConfig = config.getNetworkConfig().getJoin();
    joinConfig.getAutoDetectionConfig().setEnabled(false);
    joinConfig.getTcpIpConfig().setEnabled(false);
    MulticastConfig multicastConfig = joinConfig.getMulticastConfig();
    multicastConfig.setEnabled(true).setMulticastGroup("239.1.2.3").setMulticastPort(8686).setMulticastTimeoutSeconds(3).setMulticastTimeToLive(0).addTrustedInterface("192.168.1.1");
    return config;
}
Also used : Config(com.hazelcast.config.Config) MulticastConfig(com.hazelcast.config.MulticastConfig) JoinConfig(com.hazelcast.config.JoinConfig) JoinConfig(com.hazelcast.config.JoinConfig) MulticastConfig(com.hazelcast.config.MulticastConfig)

Example 79 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class ClusterVersionInitTest method test_clusterVersion_isEventuallySet_whenNoJoinerConfiguredSingleNode.

@Test
public void test_clusterVersion_isEventuallySet_whenNoJoinerConfiguredSingleNode() {
    Config config = new Config();
    config.setClusterName(randomName());
    JoinConfig join = config.getNetworkConfig().getJoin();
    join.getMulticastConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(false);
    join.getAutoDetectionConfig().setEnabled(false);
    setupInstance(config);
    assertEqualsEventually(() -> cluster.getClusterVersion(), codebaseVersion.asVersion());
}
Also used : Config(com.hazelcast.config.Config) JoinConfig(com.hazelcast.config.JoinConfig) JoinConfig(com.hazelcast.config.JoinConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 80 with JoinConfig

use of com.hazelcast.config.JoinConfig in project hazelcast by hazelcast.

the class RestCPSubsystemTest method setup.

@Before
public void setup() {
    RestApiConfig restApiConfig = new RestApiConfig().setEnabled(true).enableGroups(RestEndpointGroup.CP);
    config.getNetworkConfig().setRestApiConfig(restApiConfig);
    JoinConfig join = config.getNetworkConfig().getJoin();
    join.getMulticastConfig().setEnabled(false);
    join.getTcpIpConfig().setEnabled(true).clear().addMember("127.0.0.1");
    config.getCPSubsystemConfig().setCPMemberCount(3);
}
Also used : RestApiConfig(com.hazelcast.config.RestApiConfig) JoinConfig(com.hazelcast.config.JoinConfig) Before(org.junit.Before)

Aggregations

JoinConfig (com.hazelcast.config.JoinConfig)90 Config (com.hazelcast.config.Config)64 NetworkConfig (com.hazelcast.config.NetworkConfig)32 Test (org.junit.Test)32 TcpIpConfig (com.hazelcast.config.TcpIpConfig)27 QuickTest (com.hazelcast.test.annotation.QuickTest)20 InterfacesConfig (com.hazelcast.config.InterfacesConfig)18 HazelcastInstance (com.hazelcast.core.HazelcastInstance)18 MulticastConfig (com.hazelcast.config.MulticastConfig)15 PartitionGroupConfig (com.hazelcast.config.PartitionGroupConfig)15 DiscoveryConfig (com.hazelcast.config.DiscoveryConfig)13 SlowTest (com.hazelcast.test.annotation.SlowTest)12 DiscoveryStrategyConfig (com.hazelcast.config.DiscoveryStrategyConfig)11 RealmConfig (com.hazelcast.config.security.RealmConfig)11 ClientConfig (com.hazelcast.client.config.ClientConfig)9 ListenerConfig (com.hazelcast.config.ListenerConfig)8 AwsConfig (com.hazelcast.config.AwsConfig)7 MemberAttributeConfig (com.hazelcast.config.MemberAttributeConfig)7 ServerSocketEndpointConfig (com.hazelcast.config.ServerSocketEndpointConfig)6 CountDownLatch (java.util.concurrent.CountDownLatch)6