Skip to content

Commit ca894a0

Browse files
authored
Unwrap failure in testCancelRequestWhenFailingFetchingPages (elastic#121597) (elastic#121613)
The thrown exception may be wrapped in an ExecutionException; therefore, we need to unwrap it before verification. Closes elastic#121596 Closes elastic#118193
1 parent 8451de0 commit ca894a0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,6 @@ tests:
341341
- class: org.elasticsearch.repositories.s3.RepositoryS3EcsCredentialsRestIT
342342
method: testNonexistentBucketReadonlyFalse
343343
issue: https://github.com/elastic/elasticsearch/issues/118225
344-
- class: org.elasticsearch.xpack.esql.action.EsqlActionTaskIT
345-
method: testCancelRequestWhenFailingFetchingPages
346-
issue: https://github.com/elastic/elasticsearch/issues/118213
347344
- class: org.elasticsearch.reservedstate.service.RepositoriesFileSettingsIT
348345
method: testSettingsApplied
349346
issue: https://github.com/elastic/elasticsearch/issues/116694

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/EsqlActionTaskIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,9 @@ protected void doRun() throws Exception {
462462
}
463463
Exception failure = expectThrows(Exception.class, () -> future.actionGet().close());
464464
EsqlTestUtils.assertEsqlFailure(failure);
465-
assertThat(failure.getMessage(), containsString("failed to fetch pages"));
465+
Throwable cause = ExceptionsHelper.unwrap(failure, IOException.class);
466+
assertNotNull(cause);
467+
assertThat(cause.getMessage(), containsString("failed to fetch pages"));
466468
// If we proceed without waiting for pages, we might cancel the main request before starting the data-node request.
467469
// As a result, the exchange sinks on data-nodes won't be removed until the inactive_timeout elapses, which is
468470
// longer than the assertBusy timeout.

0 commit comments

Comments
 (0)