Search in sources :

Example 1 with TestRaftEndpoint

use of com.hazelcast.cp.internal.raft.impl.testing.TestRaftEndpoint in project hazelcast by hazelcast.

the class RaftStateTest method isKnownEndpoint.

@Test
public void isKnownEndpoint() {
    for (RaftEndpoint endpoint : members) {
        assertTrue(state.isKnownMember(endpoint));
    }
    assertFalse(state.isKnownMember(newRaftMember(1234)));
    assertFalse(state.isKnownMember(new TestRaftEndpoint(UUID.randomUUID(), localMember.getPort())));
    assertFalse(state.isKnownMember(new TestRaftEndpoint(localMember.getUuid(), 1234)));
}
Also used : TestRaftEndpoint(com.hazelcast.cp.internal.raft.impl.testing.TestRaftEndpoint) RaftEndpoint(com.hazelcast.cp.internal.raft.impl.RaftEndpoint) TestRaftEndpoint(com.hazelcast.cp.internal.raft.impl.testing.TestRaftEndpoint) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

RaftEndpoint (com.hazelcast.cp.internal.raft.impl.RaftEndpoint)1 TestRaftEndpoint (com.hazelcast.cp.internal.raft.impl.testing.TestRaftEndpoint)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1