Skip to content

Commit 21cfe8a

Browse files
Adjust test to match the new exception type
1 parent db90b71 commit 21cfe8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
package org.elasticsearch.xpack.esql.action;
99

10-
import org.elasticsearch.ElasticsearchException;
1110
import org.elasticsearch.compute.operator.exchange.ExchangeService;
1211
import org.elasticsearch.test.transport.MockTransportService;
1312
import org.elasticsearch.transport.TransportService;
13+
import org.elasticsearch.xpack.esql.RemoteComputeException;
1414

1515
import static org.hamcrest.Matchers.is;
1616

@@ -34,10 +34,10 @@ public void testThatRemoteErrorsAreWrapped() throws Exception {
3434
);
3535
}
3636

37-
ElasticsearchException wrappedError = expectThrows(
38-
ElasticsearchException.class,
37+
RemoteComputeException wrappedError = expectThrows(
38+
RemoteComputeException.class,
3939
() -> runQuery("FROM " + REMOTE_CLUSTER_1 + ":*," + REMOTE_CLUSTER_2 + ":* | LIMIT 100", false)
4040
);
41-
assertThat(wrappedError.getMessage(), is("cluster-a encountered an error"));
41+
assertThat(wrappedError.getMessage(), is("Remote [cluster-a] encountered an error"));
4242
}
4343
}

0 commit comments

Comments
 (0)