use of org.neo4j.causalclustering.core.consensus.outcome.PruneLogCommand in project neo4j by neo4j.
the class PruningTest method shouldGeneratePruneCommandsOnRequest.
@Test
public void shouldGeneratePruneCommandsOnRequest() throws Exception {
// given
InMemoryRaftLog raftLog = new InMemoryRaftLog();
RaftState state = raftState().myself(myself).entryLog(raftLog).build();
// when
RaftMessages.PruneRequest pruneRequest = new RaftMessages.PruneRequest(1000);
Outcome outcome = role.handler.handle(pruneRequest, state, log());
// then
assertThat(outcome.getLogCommands(), hasItem(new PruneLogCommand(1000)));
}
Aggregations