Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix testCancelFailedSearchWhenPartialResultDisallowed #64248

Merged
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 @@ -281,7 +281,6 @@ public void testCancelMultiSearch() throws Exception {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/63976")
public void testCancelFailedSearchWhenPartialResultDisallowed() throws Exception {
final List<ScriptedBlockPlugin> plugins = initBlockFactory();
int numberOfShards = between(2, 5);
Expand Down Expand Up @@ -325,8 +324,12 @@ public void testCancelFailedSearchWhenPartialResultDisallowed() throws Exception
queryLatch.countDown();
assertBusy(() -> {
final List<SearchTask> searchTasks = getSearchTasks();
assertThat(searchTasks, hasSize(1));
assertTrue(searchTasks.get(0).isCancelled());
// The search request can complete before the "cancelledLatch" is latched if the second shard request is sent
// after the request was cancelled (i.e., the child task is not allowed to start after the parent was cancelled).
if (searchTasks.isEmpty() == false) {
assertThat(searchTasks, hasSize(1));
assertTrue(searchTasks.get(0).isCancelled());
}
}, 30, TimeUnit.SECONDS);
} finally {
for (ScriptedBlockPlugin plugin : plugins) {
Expand Down