Skip to content

Commit

Permalink
No need to wrap the listener
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveCTurner committed Apr 15, 2019
1 parent fb1f7eb commit 1350c0f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,12 @@ protected void shardOperationOnPrimary(Request shardRequest, IndexShard primary,
assertFalse(executed.getAndSet(true));
super.shardOperationOnPrimary(shardRequest, primary, listener);
}
}.new AsyncPrimaryAction(primaryRequest, ActionListener.wrap(listener::onResponse, throwable -> {
throw new RuntimeException(throwable);
}), task).run();
}.new AsyncPrimaryAction(primaryRequest, listener, task).run();
assertThat(executed.get(), equalTo(true));
assertPhase(task, "finished");
assertFalse(request.isRetrySet.get());
assertTrue(listener.isDone());
listener.actionGet(); // throws no exception
}

public void testPrimaryReference() {
Expand Down

0 comments on commit 1350c0f

Please sign in to comment.