Skip to content

Commit

Permalink
Unwrap failure in testCancelRequestWhenFailingFetchingPages (elastic#…
Browse files Browse the repository at this point in the history
…121597)

The thrown exception may be wrapped in an ExecutionException; therefore, 
we need to unwrap it before verification.

Closes elastic#121596
Closes elastic#118193
  • Loading branch information
dnhatn committed Feb 4, 2025
1 parent c558433 commit c58c6e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ tests:
- class: org.elasticsearch.xpack.ml.integration.RegressionIT
method: testTwoJobsWithSameRandomizeSeedUseSameTrainingSet
issue: https://github.com/elastic/elasticsearch/issues/117805
- class: org.elasticsearch.xpack.esql.action.EsqlActionTaskIT
method: testCancelRequestWhenFailingFetchingPages
issue: https://github.com/elastic/elasticsearch/issues/118193
- class: org.elasticsearch.packaging.test.ArchiveTests
method: test44AutoConfigurationNotTriggeredOnNotWriteableConfDir
issue: https://github.com/elastic/elasticsearch/issues/118208
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ protected void doRun() throws Exception {
}
Exception failure = expectThrows(Exception.class, () -> future.actionGet().close());
EsqlTestUtils.assertEsqlFailure(failure);
assertThat(failure.getMessage(), containsString("failed to fetch pages"));
Throwable cause = ExceptionsHelper.unwrap(failure, IOException.class);
assertNotNull(cause);
assertThat(cause.getMessage(), containsString("failed to fetch pages"));
// If we proceed without waiting for pages, we might cancel the main request before starting the data-node request.
// As a result, the exchange sinks on data-nodes won't be removed until the inactive_timeout elapses, which is
// longer than the assertBusy timeout.
Expand Down

0 comments on commit c58c6e4

Please sign in to comment.