diff --git a/tests/unit/tls_test.cc b/tests/unit/tls_test.cc index f2e4c794c8..aabd94771e 100644 --- a/tests/unit/tls_test.cc +++ b/tests/unit/tls_test.cc @@ -1039,8 +1039,12 @@ SEASTAR_THREAD_TEST_CASE(test_reload_certificates) { } try { - f2.get(); - BOOST_FAIL("should not reach"); + auto res = f2.get(); + // If the server completes sending data to the client + // during the handshake before the client has fully + // closed its connection, then the get() call will + // succeed by return an empty buffer indicating EOF + BOOST_REQUIRE(res.size() == 0); } catch (...) { // ok }