Skip to content

Commit

Permalink
Fix CrossClusterEsqlEnrichUnavailableRemotesIT: also track `node_no…
Browse files Browse the repository at this point in the history
…t_connected_exception` as a valid node not available error (#120413)
  • Loading branch information
pawankartik-elastic authored Jan 17, 2025
1 parent 43e3e24 commit 53cca8e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ private void esqlEnrichWithSkipUnavailableTrue() throws Exception {
Map<String, ?> failuresMap = (Map<String, ?>) remoteClusterFailures.get(0);

Map<String, ?> reason = (Map<String, ?>) failuresMap.get("reason");
assertThat(reason.get("type").toString(), oneOf("node_disconnected_exception", "connect_transport_exception"));
assertThat(
reason.get("type").toString(),
oneOf("node_disconnected_exception", "connect_transport_exception", "node_not_connected_exception")
);
} finally {
fulfillingCluster.start();
closeFulfillingClusterClient();
Expand All @@ -206,7 +209,11 @@ private void esqlEnrichWithSkipUnavailableFalse() throws Exception {

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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ private void esqlEnrichWithSkipUnavailableTrue() throws Exception {
Map<String, ?> failuresMap = (Map<String, ?>) remoteClusterFailures.get(0);

Map<String, ?> reason = (Map<String, ?>) failuresMap.get("reason");
assertThat(reason.get("type").toString(), oneOf("node_disconnected_exception", "connect_transport_exception"));
assertThat(
reason.get("type").toString(),
oneOf("node_disconnected_exception", "connect_transport_exception", "node_not_connected_exception")
);
} finally {
fulfillingCluster.start();
closeFulfillingClusterClient();
Expand All @@ -225,7 +228,11 @@ private void esqlEnrichWithSkipUnavailableFalse() throws Exception {
ResponseException ex = expectThrows(ResponseException.class, () -> performRequestWithRemoteSearchUser(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();
Expand Down

0 comments on commit 53cca8e

Please sign in to comment.