From 98981e195566e89c6eefc07bca47f81adef73ac6 Mon Sep 17 00:00:00 2001 From: Pawan Kartik Date: Fri, 17 Jan 2025 14:18:36 +0000 Subject: [PATCH 1/2] Unmute `CrossClusterEsqlRCS1UnavailableRemotesIT.testEsqlRcs1UnavailableRemoteScenarios` --- muted-tests.yml | 3 --- .../CrossClusterEsqlRCS1UnavailableRemotesIT.java | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 1299248c1c4cd..d911fb01ef45b 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -170,9 +170,6 @@ tests: - class: org.elasticsearch.action.search.SearchQueryThenFetchAsyncActionTests method: testBottomFieldSort issue: https://github.com/elastic/elasticsearch/issues/118214 -- class: org.elasticsearch.xpack.remotecluster.CrossClusterEsqlRCS1UnavailableRemotesIT - method: testEsqlRcs1UnavailableRemoteScenarios - issue: https://github.com/elastic/elasticsearch/issues/118350 - class: org.elasticsearch.xpack.searchablesnapshots.RetrySearchIntegTests method: testSearcherId issue: https://github.com/elastic/elasticsearch/issues/118374 diff --git a/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java b/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java index b6fc43e2a6e48..35c62e25701d4 100644 --- a/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java +++ b/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java @@ -26,6 +26,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.greaterThan; public class CrossClusterEsqlRCS1UnavailableRemotesIT extends AbstractRemoteClusterSecurityTestCase { @@ -177,7 +178,10 @@ private void remoteClusterShutdownWithSkipUnavailableFalse() throws Exception { // A simple query that targets our remote cluster. String query = "FROM *,my_remote_cluster:* | LIMIT 10"; ResponseException ex = expectThrows(ResponseException.class, () -> client().performRequest(esqlRequest(query))); - assertThat(ex.getMessage(), containsString("connect_transport_exception")); + assertThat( + ex.getMessage(), + anyOf(containsString("connect_transport_exception"), containsString("node_disconnected_exception")) + ); } finally { fulfillingCluster.start(); closeFulfillingClusterClient(); From f16ef75bec44be40ea32a70e932110a29fb362b5 Mon Sep 17 00:00:00 2001 From: Pawan Kartik Date: Fri, 17 Jan 2025 18:35:20 +0000 Subject: [PATCH 2/2] Track `node_not_connected_exception` --- .../CrossClusterEsqlRCS1UnavailableRemotesIT.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java b/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java index 35c62e25701d4..5f4aa9b3fd2c3 100644 --- a/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java +++ b/x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1UnavailableRemotesIT.java @@ -180,7 +180,11 @@ private void remoteClusterShutdownWithSkipUnavailableFalse() throws Exception { ResponseException ex = expectThrows(ResponseException.class, () -> client().performRequest(esqlRequest(query))); assertThat( ex.getMessage(), - anyOf(containsString("connect_transport_exception"), containsString("node_disconnected_exception")) + anyOf( + containsString("connect_transport_exception"), + containsString("node_disconnected_exception"), + containsString("node_not_connected_exception") + ) ); } finally { fulfillingCluster.start();