Skip to content

Commit 2ac89c7

Browse files
Remove redundant getCause()
1 parent 99f9b45 commit 2ac89c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public void testCancel() throws Exception {
173173
}
174174
Exception error = expectThrows(Exception.class, requestFuture::actionGet);
175175
error = unwrapIfWrappedInRemoteComputeException(error);
176-
assertThat(error.getCause().getMessage(), containsString("proxy timeout"));
176+
assertThat(error.getMessage(), containsString("proxy timeout"));
177177
}
178178

179179
public void testSameRemoteClusters() throws Exception {
@@ -295,6 +295,6 @@ public void testCancelSkipUnavailable() throws Exception {
295295

296296
Exception error = expectThrows(Exception.class, requestFuture::actionGet);
297297
error = unwrapIfWrappedInRemoteComputeException(error);
298-
assertThat(error.getCause(), instanceOf(TaskCancelledException.class));
298+
assertThat(error, instanceOf(TaskCancelledException.class));
299299
}
300300
}

0 commit comments

Comments
 (0)