use of com.hazelcast.version.Version in project hazelcast by hazelcast.
the class ClusterVersionInitTest method test_clusterVersion_isEventuallySet_whenTcpJoinerConfiguredSingleNode.
@Test
public void test_clusterVersion_isEventuallySet_whenTcpJoinerConfiguredSingleNode() {
Config config = new Config();
config.getGroupConfig().setName(randomName());
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
setupInstance(config);
assertEqualsEventually(new Callable<Version>() {
@Override
public Version call() throws Exception {
return cluster.getClusterVersion();
}
}, codebaseVersion.asVersion());
}
use of com.hazelcast.version.Version in project hazelcast by hazelcast.
the class ClusterVersionInitTest method test_clusterVersion_isEventuallySetOnJoiningMember_whenMulticastJoinerConfigured.
@Test
public void test_clusterVersion_isEventuallySetOnJoiningMember_whenMulticastJoinerConfigured() {
Config config = new Config();
config.getGroupConfig().setName(randomName());
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(true);
setupInstance(config);
HazelcastInstance joiner = Hazelcast.newHazelcastInstance(config);
final ClusterServiceImpl joinerCluster = (ClusterServiceImpl) joiner.getCluster();
assertEqualsEventually(new Callable<Version>() {
@Override
public Version call() throws Exception {
return joinerCluster.getClusterVersion();
}
}, codebaseVersion.asVersion());
joiner.shutdown();
}
use of com.hazelcast.version.Version in project hazelcast by hazelcast.
the class ClusterVersionInitTest method test_clusterVersion_isEventuallySetOnJoiningMember_whenTcpJoinerConfigured.
@Test
public void test_clusterVersion_isEventuallySetOnJoiningMember_whenTcpJoinerConfigured() {
Config config = new Config();
config.getGroupConfig().setName(randomName());
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);
setupInstance(config);
HazelcastInstance joiner = Hazelcast.newHazelcastInstance(config);
final ClusterServiceImpl joinerCluster = (ClusterServiceImpl) joiner.getCluster();
assertEqualsEventually(new Callable<Version>() {
@Override
public Version call() throws Exception {
return joinerCluster.getClusterVersion();
}
}, codebaseVersion.asVersion());
joiner.shutdown();
}
use of com.hazelcast.version.Version in project hazelcast by hazelcast.
the class ClusterVersionChangeTest method test_clusterVersionUpgradeFails_whenNodeMajorVersionPlusOne.
@Test
public void test_clusterVersionUpgradeFails_whenNodeMajorVersionPlusOne() {
Version newVersion = Version.of(codebaseVersion.getMajor() + 1, codebaseVersion.getMinor());
expectedException.expect(VersionMismatchException.class);
cluster.changeClusterVersion(newVersion);
}
use of com.hazelcast.version.Version 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.getGroupConfig().setName(randomName());
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(false);
setupInstance(config);
assertEqualsEventually(new Callable<Version>() {
@Override
public Version call() throws Exception {
return cluster.getClusterVersion();
}
}, codebaseVersion.asVersion());
}
Aggregations