From db318daadfd31fadb14c45c8f128c1820a0a1a02 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 d554e3f96c..80d5a7651b 100644 --- a/tests/unit/tls_test.cc +++ b/tests/unit/tls_test.cc @@ -1068,8 +1068,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 }