Skip to content

Commit

Permalink
Target the search at the specific user index
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrandolph committed Apr 12, 2024
1 parent e3bbf41 commit 6755242
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,15 @@ private void assertThreadPoolsBlocked() {
assertThat(e1.getMessage(), startsWith("rejected execution of TimedRunnable"));
var e2 = expectThrows(EsRejectedExecutionException.class, () -> client().prepareGet(USER_INDEX, "id").get());
assertThat(e2.getMessage(), startsWith("rejected execution of ActionRunnable"));
var e3 = expectThrows(SearchPhaseExecutionException.class, () -> {
client().prepareSearch()
var e3 = expectThrows(
SearchPhaseExecutionException.class,
() -> client().prepareSearch(USER_INDEX)
.setQuery(QueryBuilders.matchAllQuery())
// Don't let the test framework set maxConcurrentShardRequests randomly, because the
// request times out if this is set to 1
.setMaxConcurrentShardRequests(SearchRequest.DEFAULT_MAX_CONCURRENT_SHARD_REQUESTS)
.get();
});
.get()
);
assertThat(e3.getMessage(), containsString("all shards failed"));
}

Expand Down

0 comments on commit 6755242

Please sign in to comment.