Skip to content

Commit 53cca8e

Browse files
Fix CrossClusterEsqlEnrichUnavailableRemotesIT: also track node_not_connected_exception as a valid node not available error (#120413)
1 parent 43e3e24 commit 53cca8e

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS1EnrichUnavailableRemotesIT.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ private void esqlEnrichWithSkipUnavailableTrue() throws Exception {
187187
Map<String, ?> failuresMap = (Map<String, ?>) remoteClusterFailures.get(0);
188188

189189
Map<String, ?> reason = (Map<String, ?>) failuresMap.get("reason");
190-
assertThat(reason.get("type").toString(), oneOf("node_disconnected_exception", "connect_transport_exception"));
190+
assertThat(
191+
reason.get("type").toString(),
192+
oneOf("node_disconnected_exception", "connect_transport_exception", "node_not_connected_exception")
193+
);
191194
} finally {
192195
fulfillingCluster.start();
193196
closeFulfillingClusterClient();
@@ -206,7 +209,11 @@ private void esqlEnrichWithSkipUnavailableFalse() throws Exception {
206209

207210
assertThat(
208211
ex.getMessage(),
209-
anyOf(containsString("connect_transport_exception"), containsString("node_disconnected_exception"))
212+
anyOf(
213+
containsString("connect_transport_exception"),
214+
containsString("node_disconnected_exception"),
215+
containsString("node_not_connected_exception")
216+
)
210217
);
211218
} finally {
212219
fulfillingCluster.start();

x-pack/plugin/security/qa/multi-cluster/src/javaRestTest/java/org/elasticsearch/xpack/remotecluster/CrossClusterEsqlRCS2EnrichUnavailableRemotesIT.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ private void esqlEnrichWithSkipUnavailableTrue() throws Exception {
207207
Map<String, ?> failuresMap = (Map<String, ?>) remoteClusterFailures.get(0);
208208

209209
Map<String, ?> reason = (Map<String, ?>) failuresMap.get("reason");
210-
assertThat(reason.get("type").toString(), oneOf("node_disconnected_exception", "connect_transport_exception"));
210+
assertThat(
211+
reason.get("type").toString(),
212+
oneOf("node_disconnected_exception", "connect_transport_exception", "node_not_connected_exception")
213+
);
211214
} finally {
212215
fulfillingCluster.start();
213216
closeFulfillingClusterClient();
@@ -225,7 +228,11 @@ private void esqlEnrichWithSkipUnavailableFalse() throws Exception {
225228
ResponseException ex = expectThrows(ResponseException.class, () -> performRequestWithRemoteSearchUser(esqlRequest(query)));
226229
assertThat(
227230
ex.getMessage(),
228-
anyOf(containsString("connect_transport_exception"), containsString("node_disconnected_exception"))
231+
anyOf(
232+
containsString("connect_transport_exception"),
233+
containsString("node_disconnected_exception"),
234+
containsString("node_not_connected_exception")
235+
)
229236
);
230237
} finally {
231238
fulfillingCluster.start();

0 commit comments

Comments
 (0)