Search in sources :

Example 1 with VoteRequestBuilder

use of org.neo4j.causalclustering.core.consensus.vote.VoteRequestBuilder in project neo4j by neo4j.

the class RaftMessageEncodingDecodingTest method shouldSerializeVoteRequest.

@Test
public void shouldSerializeVoteRequest() throws Exception {
    MemberId sender = new MemberId(UUID.randomUUID());
    RaftMessages.Vote.Request request = new VoteRequestBuilder().candidate(sender).from(sender).lastLogIndex(2).lastLogTerm(1).term(3).build();
    serializeReadBackAndVerifyMessage(request);
}
Also used : MemberId(org.neo4j.causalclustering.identity.MemberId) VoteRequestBuilder(org.neo4j.causalclustering.core.consensus.vote.VoteRequestBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 VoteRequestBuilder (org.neo4j.causalclustering.core.consensus.vote.VoteRequestBuilder)1 MemberId (org.neo4j.causalclustering.identity.MemberId)1