Fix assertion in AbstractSimpleTransportTestCase (#32991)

This is a follow-up to #32956. That commit incorrectly used assertBusy
which led to a possible race in the test. This commit fixes it.
This commit is contained in:
Tim Brooks 2018-08-20 16:09:22 -06:00 committed by GitHub
parent 2feda8aae0
commit cd83ddcecc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2650,7 +2650,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);
}