Skip to content

Commit

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

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

Closes #121596
Closes #118193
  • Loading branch information
dnhatn authored Feb 4, 2025
1 parent f692fc8 commit 74eaddd
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 @@ -341,9 +341,6 @@ tests:
- class: org.elasticsearch.repositories.s3.RepositoryS3EcsCredentialsRestIT
method: testNonexistentBucketReadonlyFalse
issue: https://github.com/elastic/elasticsearch/issues/118225
- class: org.elasticsearch.xpack.esql.action.EsqlActionTaskIT
method: testCancelRequestWhenFailingFetchingPages
issue: https://github.com/elastic/elasticsearch/issues/118213
- class: org.elasticsearch.reservedstate.service.RepositoriesFileSettingsIT
method: testSettingsApplied
issue: https://github.com/elastic/elasticsearch/issues/116694
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 74eaddd

Please sign in to comment.