Skip to content

Commit 90b314a

Browse files
Rename leftover remnants
1 parent 8a5d6a0 commit 90b314a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/EsqlTestUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -861,12 +861,12 @@ public static <T> T singleValue(Collection<T> collection) {
861861
}
862862

863863
/**
864-
* Errors from remotes are wrapped in RemoteComputeException while the ones from the local cluster
864+
* Errors from remotes are wrapped in RemoteException while the ones from the local cluster
865865
* aren't. This utility method is useful for unwrapping in such cases.
866866
* @param e Exception to unwrap.
867-
* @return Cause of RemoteComputeException, else the error itself.
867+
* @return Cause of RemoteException, else the error itself.
868868
*/
869-
public static Exception unwrapIfWrappedInRemoteComputeException(Exception e) {
869+
public static Exception unwrapIfWrappedInRemoteException(Exception e) {
870870
if (e instanceof RemoteException rce) {
871871
return (Exception) rce.getCause();
872872
} else {

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
@@ -164,7 +164,7 @@ public void testCancel() throws Exception {
164164
SimplePauseFieldPlugin.allowEmitting.countDown();
165165
}
166166
Exception error = expectThrows(Exception.class, requestFuture::actionGet);
167-
error = EsqlTestUtils.unwrapIfWrappedInRemoteComputeException(error);
167+
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);
168168
assertThat(error.getMessage(), containsString("proxy timeout"));
169169
}
170170

@@ -286,7 +286,7 @@ public void testCancelSkipUnavailable() throws Exception {
286286
}
287287

288288
Exception error = expectThrows(Exception.class, requestFuture::actionGet);
289-
error = EsqlTestUtils.unwrapIfWrappedInRemoteComputeException(error);
289+
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);
290290
assertThat(error, instanceOf(TaskCancelledException.class));
291291
}
292292
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ public void testRemoteFailureSkipUnavailableTrue() throws IOException {
817817
String q = Strings.format("FROM %s,cluster-a:%s*", localIndex, remote1Index);
818818

819819
Exception error = expectThrows(Exception.class, () -> runQuery(q, false));
820-
error = EsqlTestUtils.unwrapIfWrappedInRemoteComputeException(error);
820+
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);
821821

822822
assertThat(error, instanceOf(IllegalStateException.class));
823823
assertThat(error.getMessage(), containsString("Accessing failing field"));

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public void testPartialResults() throws Exception {
106106
{
107107
request.allowPartialResults(false);
108108
Exception error = expectThrows(Exception.class, () -> runQuery(request).close());
109-
error = EsqlTestUtils.unwrapIfWrappedInRemoteComputeException(error);
109+
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);
110110

111111
assertThat(error, instanceOf(IllegalStateException.class));
112112
assertThat(error.getMessage(), containsString("Accessing failing field"));
@@ -194,7 +194,7 @@ public void sendResponse(Exception exception) {
194194
{
195195
request.allowPartialResults(false);
196196
Exception error = expectThrows(Exception.class, () -> runQuery(request).close());
197-
error = EsqlTestUtils.unwrapIfWrappedInRemoteComputeException(error);
197+
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);
198198
var unwrapped = ExceptionsHelper.unwrap(error, simulatedFailure.getClass());
199199
assertNotNull(unwrapped);
200200
assertThat(unwrapped.getMessage(), equalTo(simulatedFailure.getMessage()));
@@ -242,7 +242,7 @@ public void testFailToStartRequestOnRemoteCluster() throws Exception {
242242
{
243243
request.allowPartialResults(false);
244244
Exception error = expectThrows(Exception.class, () -> runQuery(request).close());
245-
error = EsqlTestUtils.unwrapIfWrappedInRemoteComputeException(error);
245+
error = EsqlTestUtils.unwrapIfWrappedInRemoteException(error);
246246
EsqlTestUtils.assertEsqlFailure(error);
247247
var unwrapped = ExceptionsHelper.unwrap(error, simulatedFailure.getClass());
248248
assertNotNull(unwrapped);

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plugin/ComputeService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ public void execute(
345345
/*
346346
* At various points, when collecting failures before sending a response, we manually check
347347
* if an ex is a transport error and if it is, we unwrap it. Because we're wrapping an ex
348-
* in RemoteComputeException, the checks fail and unwrapping does not happen. We offload
349-
* the unwrapping to here.
348+
* in RemoteException, the checks fail and unwrapping does not happen. We offload the
349+
* unwrapping to here.
350350
*
351351
* Note: The other error we explicitly check for is TaskCancelledException which is never
352352
* wrapped.

0 commit comments

Comments
 (0)