diff --git a/core/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java b/core/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java index 646efa9428d..1dbd9352294 100644 --- a/core/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java +++ b/core/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java @@ -410,12 +410,16 @@ public class RemoteClusterServiceTests extends ESTestCase { }); failLatch.await(); assertNotNull(ex.get()); - if (ex.get() instanceof TransportException == false) { - // we have an issue for this see #25301 - logger.error("expected TransportException but got a different one see #25301", ex.get()); + if (ex.get() instanceof IllegalStateException) { + assertEquals(ex.get().getMessage(), "no seed node left"); + } else { + if (ex.get() instanceof TransportException == false) { + // we have an issue for this see #25301 + logger.error("expected TransportException but got a different one see #25301", ex.get()); + } + assertTrue("expected TransportException but got a different one [" + ex.get().getClass().toString() + "]", + ex.get() instanceof TransportException); } - assertTrue("expected TransportException but got a different one [" + ex.get().getClass().toString() + "]", - ex.get() instanceof TransportException); } } }