Fix assertion in AbstractSimpleTransportTestCase
This is a follow-up to That commit incorrectly used assertBusy
which led to a possible race in the test. This commit fixes it.
@@ -2653,7 +2653,7 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase {
public void onConnectionOpened(final Transport.Connection connection) {
closeConnectionChannel(connection);
try {
- assertBusy(connection::isClosed);
+ assertBusy(() -> assertTrue(connection.isClosed()));
} catch (Exception e) {
throw new AssertionError(e);
}
