[TEST] Add debug logging if an unexpected exception is thrown

This commit is contained in:
Simon Willnauer 2017-06-22 21:18:58 +02:00
parent 96b62409a8
commit a077fa9b07
1 changed files with 6 additions and 1 deletions

View File

@ -410,7 +410,12 @@ public class RemoteClusterServiceTests extends ESTestCase {
});
failLatch.await();
assertNotNull(ex.get());
assertTrue(ex.get().getClass().toString(), ex.get() instanceof TransportException);
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);
}
}
}