diff --git a/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java b/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java index 9da5e612966..3c258f91edc 100644 --- a/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java +++ b/server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java @@ -657,8 +657,9 @@ public class RemoteClusterServiceTests extends ESTestCase { }); failLatch.await(); assertNotNull(ex.get()); - if (ex.get() instanceof IllegalStateException) { - assertThat(ex.get().getMessage(), equalTo("no seed node left")); + if (ex.get() instanceof IllegalStateException) { + assertThat(ex.get().getMessage(), either(equalTo("no seed node left")) + .or(equalTo("Unable to open any connections to remote cluster [cluster_2]"))); } else { assertThat(ex.get(), either(instanceOf(TransportException.class)).or(instanceOf(NoSuchRemoteClusterException.class)));