Search in sources :

Example 6 with PromoteLiteMemberOp

use of com.hazelcast.internal.cluster.impl.operations.PromoteLiteMemberOp in project hazelcast by hazelcast.

the class PromoteLiteMemberTest method normalMember_promotion_shouldBeNoop_onMaster.

@Test
public void normalMember_promotion_shouldBeNoop_onMaster() {
    TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory();
    HazelcastInstance hz1 = factory.newHazelcastInstance(new Config());
    HazelcastInstance hz2 = factory.newHazelcastInstance(new Config());
    PromoteLiteMemberOp op = new PromoteLiteMemberOp();
    op.setCallerUuid(getMember(hz2).getUuid());
    InternalCompletableFuture<MembersView> future = getOperationService(hz2).invokeOnTarget(ClusterServiceImpl.SERVICE_NAME, op, getAddress(hz1));
    future.join();
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) Config(com.hazelcast.config.Config) PromoteLiteMemberOp(com.hazelcast.internal.cluster.impl.operations.PromoteLiteMemberOp) TestHazelcastInstanceFactory(com.hazelcast.test.TestHazelcastInstanceFactory) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

PromoteLiteMemberOp (com.hazelcast.internal.cluster.impl.operations.PromoteLiteMemberOp)6 Config (com.hazelcast.config.Config)3 HazelcastInstance (com.hazelcast.core.HazelcastInstance)3 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)3 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)3 QuickTest (com.hazelcast.test.annotation.QuickTest)3 Test (org.junit.Test)3 MemberImpl (com.hazelcast.cluster.impl.MemberImpl)2 RootCauseMatcher (com.hazelcast.internal.util.RootCauseMatcher)2 Address (com.hazelcast.cluster.Address)1 VectorClock (com.hazelcast.cluster.impl.VectorClock)1 EndpointQualifier (com.hazelcast.instance.EndpointQualifier)1 MemberInfo (com.hazelcast.internal.cluster.MemberInfo)1 AuthenticationFailureOp (com.hazelcast.internal.cluster.impl.operations.AuthenticationFailureOp)1 BeforeJoinCheckFailureOp (com.hazelcast.internal.cluster.impl.operations.BeforeJoinCheckFailureOp)1 ClusterMismatchOp (com.hazelcast.internal.cluster.impl.operations.ClusterMismatchOp)1 CommitClusterStateOp (com.hazelcast.internal.cluster.impl.operations.CommitClusterStateOp)1 ConfigMismatchOp (com.hazelcast.internal.cluster.impl.operations.ConfigMismatchOp)1 ExplicitSuspicionOp (com.hazelcast.internal.cluster.impl.operations.ExplicitSuspicionOp)1 FetchMembersViewOp (com.hazelcast.internal.cluster.impl.operations.FetchMembersViewOp)1