Skip to content

Commit 23035de

Browse files
committed
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.
1 parent 2c75504 commit 23035de

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
@@ -2653,7 +2653,7 @@ public void testChannelCloseWhileConnecting() {
26532653
public void onConnectionOpened(final Transport.Connection connection) {
26542654
closeConnectionChannel(connection);
26552655
try {
2656-
assertBusy(connection::isClosed);
2656+
assertBusy(() -> assertTrue(connection.isClosed()));
26572657
} catch (Exception e) {
26582658
throw new AssertionError(e);
26592659
}

0 commit comments

Comments
 (0)