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