Search in sources :

Example 6 with JoinRequest

use of com.hazelcast.internal.cluster.impl.JoinRequest in project hazelcast by hazelcast.

the class DefaultNodeExtensionTest method test_joinRequestFails_whenOtherMajorVersion.

@Test
public void test_joinRequestFails_whenOtherMajorVersion() throws UnknownHostException {
    MemberVersion otherPatchVersion = MemberVersion.of(node.getVersion().getMajor() + 1, node.getVersion().getMinor(), node.getVersion().getPatch());
    JoinRequest joinRequest = new JoinRequest(Packet.VERSION, BUILD_INFO.getBuildNumber(), otherPatchVersion, new Address("127.0.0.1", 9999), UuidUtil.newUnsecureUuidString(), false, null, null, null, null);
    expected.expect(VersionMismatchException.class);
    nodeExtension.validateJoinRequest(joinRequest);
}
Also used : Address(com.hazelcast.nio.Address) JoinRequest(com.hazelcast.internal.cluster.impl.JoinRequest) MemberVersion(com.hazelcast.version.MemberVersion) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

JoinRequest (com.hazelcast.internal.cluster.impl.JoinRequest)6 Address (com.hazelcast.nio.Address)4 ParallelTest (com.hazelcast.test.annotation.ParallelTest)4 QuickTest (com.hazelcast.test.annotation.QuickTest)4 Test (org.junit.Test)4 MemberVersion (com.hazelcast.version.MemberVersion)3 Credentials (com.hazelcast.security.Credentials)1