From 462d7bf3bda5c532a3e6791c989383a7d162d0a5 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Mon, 20 Aug 2018 10:01:34 -0600 Subject: [PATCH] Fix assertion in AbstractSimpleTransportTestCase 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. --- .../transport/AbstractSimpleTransportTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java index 4e59aaecf8de2..21dbc561c6b02 100644 --- a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java @@ -2650,7 +2650,7 @@ public void testChannelCloseWhileConnecting() { public void onConnectionOpened(final Transport.Connection connection) { closeConnectionChannel(connection); try { - assertBusy(connection::isClosed); + assertBusy(() -> assertTrue(connection.isClosed())); } catch (Exception e) { throw new AssertionError(e); }