- public static void waitUntilLeader(ActorRef actorRef) {
- FiniteDuration duration = Duration.create(100, TimeUnit.MILLISECONDS);
- for(int i = 0; i < 20 * 5; i++) {
- Future<Object> future = Patterns.ask(actorRef, new FindLeader(), new Timeout(duration));
+ @SuppressWarnings("checkstyle:IllegalCatch")
+ public static void waitUntilLeader(final ActorRef actorRef) {
+ FiniteDuration duration = FiniteDuration.create(100, TimeUnit.MILLISECONDS);
+ for (int i = 0; i < 20 * 5; i++) {
+ Future<Object> future = Patterns.ask(actorRef, FindLeader.INSTANCE, new Timeout(duration));