Skip to content

Commit

Permalink
Resolve/cluster should handle IllegalArgumentException 'Unable to ope…
Browse files Browse the repository at this point in the history
…n connection' as connected=false and not display error (elastic#105512)

Fixed elastic#105489
  • Loading branch information
quux00 authored Feb 15, 2024
1 parent 4faaa28 commit 949a294
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ public void testClusterResolveWithMatchingAliases() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/105489")
public void testClusterResolveDisconnectedAndErrorScenarios() throws Exception {
Map<String, Object> testClusterInfo = setupThreeClusters(false);
String localIndex = (String) testClusterInfo.get("local.index");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ private boolean notConnectedError(Exception e) {
if (e instanceof ConnectTransportException || e instanceof NoSuchRemoteClusterException) {
return true;
}
if (e instanceof IllegalStateException && e.getMessage().contains("Unable to open any connections")) {
return true;
}
Throwable ill = ExceptionsHelper.unwrap(e, IllegalArgumentException.class);
if (ill != null && ill.getMessage().contains("unknown host")) {
return true;
Expand Down

0 comments on commit 949a294

Please sign in to comment.