Skip to content

Commit cd83ddc

Browse files
authored
Fix assertion in AbstractSimpleTransportTestCase (elastic#32991)
This is a follow-up to elastic#32956. That commit incorrectly used assertBusy which led to a possible race in the test. This commit fixes it.
1 parent 2feda8a commit cd83ddc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@ public void testChannelCloseWhileConnecting() {
26502650
public void onConnectionOpened(final Transport.Connection connection) {
26512651
closeConnectionChannel(connection);
26522652
try {
2653-
assertBusy(connection::isClosed);
2653+
assertBusy(() -> assertTrue(connection.isClosed()));
26542654
} catch (Exception e) {
26552655
throw new AssertionError(e);
26562656
}

0 commit comments

Comments
 (0)