assertIncompatible(config1, config2);
}
@Test
public void test_whenIncompatiblePartitionGroups() throws Exception {
Config config1 = new Config();
config1.setProperty(GroupProperties.PROP_WAIT_SECONDS_BEFORE_JOIN, "0");
config1.setProperty(GroupProperties.PROP_MAX_JOIN_SECONDS, "3");
config1.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config1.getNetworkConfig().getJoin().getTcpIpConfig()
.setEnabled(true).setConnectionTimeoutSeconds(3).addMember("127.0.0.1");
config1.getPartitionGroupConfig().setEnabled(true)
.setGroupType(PartitionGroupConfig.MemberGroupType.CUSTOM);
Config config2 = new Config();
config2.setProperty(GroupProperties.PROP_WAIT_SECONDS_BEFORE_JOIN, "0");
config2.setProperty(GroupProperties.PROP_MAX_JOIN_SECONDS, "3");
config2.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config2.getNetworkConfig().getJoin().getTcpIpConfig()
.setEnabled(true).setConnectionTimeoutSeconds(3).addMember("127.0.0.1");
config2.getPartitionGroupConfig().setEnabled(true)
.setGroupType(PartitionGroupConfig.MemberGroupType.HOST_AWARE);
assertIncompatible(config1, config2);
}