Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,14 @@ public void testQueryErrorEndRunNotNow() throws InterruptedException, IOExceptio
// make PageIterator.next return failure
doAnswer(invocation -> {
ActionListener<SearchResponse> listener = invocation.getArgument(1);
listener
.onFailure(
new SearchPhaseExecutionException(
"search",
allShardsFailedMsg,
new ShardSearchFailure[] { new ShardSearchFailure(new IllegalArgumentException("blah")) }
)
);
// Create SearchPhaseExecutionException without ShardSearchFailure to avoid log4j NPE
// when rendering corrupted stack trace metadata in nested exceptions
SearchPhaseExecutionException ex = new SearchPhaseExecutionException(
"search",
allShardsFailedMsg + "; shardFailures {IllegalArgumentException[blah]}",
new ShardSearchFailure[0]
);
listener.onFailure(ex);
inProgressLatch.countDown();
return null;
}).when(client).search(any(), any());
Expand Down
Loading