From 5c709c28d63f9ab9dab5b253e45c352d9d6b0398 Mon Sep 17 00:00:00 2001 From: Michael Boquard Date: Thu, 5 Dec 2024 14:02:09 -0500 Subject: [PATCH] tls/test: Updated test_reload_certificates Now handling situations where the get() call doesn't throw but does return an empty buffer indicating EOF. Signed-off-by: Michael Boquard --- tests/unit/tls_test.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 }