use of com.hazelcast.config.MulticastConfig in project hazelcast by hazelcast.
the class DiscoverySpiTest method testParsing.
@Test
public void testParsing() throws Exception {
String xmlFileName = "test-hazelcast-discovery-spi.xml";
InputStream xmlResource = DiscoverySpiTest.class.getClassLoader().getResourceAsStream(xmlFileName);
Config config = new XmlConfigBuilder(xmlResource).build();
JoinConfig joinConfig = config.getNetworkConfig().getJoin();
AwsConfig awsConfig = joinConfig.getAwsConfig();
assertFalse(awsConfig.isEnabled());
TcpIpConfig tcpIpConfig = joinConfig.getTcpIpConfig();
assertFalse(tcpIpConfig.isEnabled());
MulticastConfig multicastConfig = joinConfig.getMulticastConfig();
assertFalse(multicastConfig.isEnabled());
DiscoveryConfig discoveryConfig = joinConfig.getDiscoveryConfig();
assertTrue(discoveryConfig.isEnabled());
assertEquals(1, discoveryConfig.getDiscoveryStrategyConfigs().size());
DiscoveryStrategyConfig providerConfig = discoveryConfig.getDiscoveryStrategyConfigs().iterator().next();
assertEquals(3, providerConfig.getProperties().size());
assertEquals("foo", providerConfig.getProperties().get("key-string"));
assertEquals("123", providerConfig.getProperties().get("key-int"));
assertEquals("true", providerConfig.getProperties().get("key-boolean"));
}
use of com.hazelcast.config.MulticastConfig in project hazelcast by hazelcast.
the class MulticastJoinTest method test_whenDifferentBuildNumber.
@Test
public void test_whenDifferentBuildNumber() {
Config config = new Config();
JoinConfig join = config.getNetworkConfig().getJoin();
MulticastConfig multicastConfig = join.getMulticastConfig();
multicastConfig.setEnabled(true);
join.getTcpIpConfig().setEnabled(false);
testJoin_With_DifferentBuildNumber(config);
}
use of com.hazelcast.config.MulticastConfig in project hazelcast by hazelcast.
the class MulticastJoinTest method test.
@Test
public void test() throws Exception {
Config config = new Config();
NetworkConfig networkConfig = config.getNetworkConfig();
JoinConfig join = networkConfig.getJoin();
join.getTcpIpConfig().setEnabled(false);
MulticastConfig multicastConfig = join.getMulticastConfig();
multicastConfig.setEnabled(true);
testJoin(config);
}
Aggregations