From 245d15c8239a7db7f48c23e47dfe88171c716611 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 7d5a3ee1e1..369f34c951 100644 --- a/tests/unit/tls_test.cc +++ b/tests/unit/tls_test.cc @@ -1069,8 +1069,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 }