testLog.info("sendShutDown for {} starting", actor.path());
FiniteDuration duration = FiniteDuration.create(5, TimeUnit.SECONDS);
- Future<Boolean> stopFuture = Patterns.gracefulStop(actor, duration, new Shutdown());
+ Future<Boolean> stopFuture = Patterns.gracefulStop(actor, duration, Shutdown.INSTANCE);
Boolean stopped = Await.result(stopFuture, duration);
assertEquals("Stopped", Boolean.TRUE, stopped);
clearMessages(follower3NotifierActor);
FiniteDuration duration = FiniteDuration.create(5, TimeUnit.SECONDS);
- Future<Boolean> stopFuture = Patterns.gracefulStop(leaderActor, duration, new Shutdown());
+ Future<Boolean> stopFuture = Patterns.gracefulStop(leaderActor, duration, Shutdown.INSTANCE);
assertNullLeaderIdChange(leaderNotifierActor);
assertNullLeaderIdChange(follower1NotifierActor);
testLog.info("createRaftActors starting");
}
- private void verifyRaftState(ActorRef raftActor, final RaftState expState) throws Throwable {
+ private static void verifyRaftState(ActorRef raftActor, final RaftState expState) throws Throwable {
Timeout timeout = new Timeout(500, TimeUnit.MILLISECONDS);
Throwable lastError = null;
Stopwatch sw = Stopwatch.createStarted();
throw lastError;
}
- private void assertNullLeaderIdChange(TestActorRef<MessageCollectorActor> notifierActor) {
+ private static void assertNullLeaderIdChange(TestActorRef<MessageCollectorActor> notifierActor) {
LeaderStateChanged change = expectFirstMatching(notifierActor, LeaderStateChanged.class);
assertNull("Expected null leader Id", change.getLeaderId());
}