use of org.neo4j.causalclustering.core.consensus.roles.AppendEntriesRequestBuilder in project neo4j by neo4j.
the class RaftMessageEncodingDecodingTest method shouldSerializeAppendRequestWithMultipleEntries.
@Test
public void shouldSerializeAppendRequestWithMultipleEntries() throws Exception {
MemberId sender = new MemberId(UUID.randomUUID());
RaftMessages.AppendEntries.Request request = new AppendEntriesRequestBuilder().from(sender).leaderCommit(2).leaderTerm(4).logEntry(new RaftLogEntry(1, ReplicatedInteger.valueOf(2))).logEntry(new RaftLogEntry(1, ReplicatedInteger.valueOf(3))).logEntry(new RaftLogEntry(1, ReplicatedInteger.valueOf(4))).build();
serializeReadBackAndVerifyMessage(request);
}
use of org.neo4j.causalclustering.core.consensus.roles.AppendEntriesRequestBuilder in project neo4j by neo4j.
the class RaftMessageEncodingDecodingTest method shouldSerializeAppendRequestWithNoEntries.
@Test
public void shouldSerializeAppendRequestWithNoEntries() throws Exception {
MemberId sender = new MemberId(UUID.randomUUID());
RaftMessages.AppendEntries.Request request = new AppendEntriesRequestBuilder().from(sender).leaderCommit(2).leaderTerm(4).build();
serializeReadBackAndVerifyMessage(request);
}
Aggregations