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;
}
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;
}
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;
}
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());
}
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);
}
Aggregations