Skip to content

Commit 74d78bb

Browse files
authored
Add some logging to better see what's up with testCancelFailedSearchWhenPartialResultDisallowed (#123933)
1 parent 77a3d30 commit 74d78bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/internalClusterTest/java/org/elasticsearch/search/SearchCancellationIT.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ public void testCancelFailedSearchWhenPartialResultDisallowed() throws Exception
248248

249249
// Define (but don't run) the search request, expecting a partial shard failure. We will run it later.
250250
Thread searchThread = new Thread(() -> {
251+
logger.info("Executing search");
251252
SearchPhaseExecutionException e = expectThrows(
252253
SearchPhaseExecutionException.class,
253254
prepareSearch("test").setSearchType(SearchType.QUERY_THEN_FETCH)
@@ -285,11 +286,13 @@ public void testCancelFailedSearchWhenPartialResultDisallowed() throws Exception
285286
}
286287

287288
// Now run the search request.
289+
logger.info("Starting search thread");
288290
searchThread.start();
289291

290292
try {
291293
assertBusy(() -> {
292294
final List<SearchTask> coordinatorSearchTask = getCoordinatorSearchTasks();
295+
logger.info("Checking tasks: {}", coordinatorSearchTask);
293296
assertThat("The Coordinator should have one SearchTask.", coordinatorSearchTask, hasSize(1));
294297
assertTrue("The SearchTask should be cancelled.", coordinatorSearchTask.get(0).isCancelled());
295298
for (var shardQueryTask : getShardQueryTasks()) {

0 commit comments

Comments
 (0)