Skip to content

Commit 2f935ca

Browse files
committedDec 20, 2024
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 <[email protected]>
1 parent 98a2d0f commit 2f935ca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎tests/unit/tls_test.cc

+6-2
Original file line numberDiff line numberDiff line change
@@ -1068,8 +1068,12 @@ SEASTAR_THREAD_TEST_CASE(test_reload_certificates) {
10681068
}
10691069

10701070
try {
1071-
f2.get();
1072-
BOOST_FAIL("should not reach");
1071+
auto res = f2.get();
1072+
// If the server completes sending data to the client
1073+
// during the handshake before the client has fully
1074+
// closed its connection, then the get() call will
1075+
// succeed by return an empty buffer indicating EOF
1076+
BOOST_REQUIRE(res.size() == 0);
10731077
} catch (...) {
10741078
// ok
10751079
}

0 commit comments

Comments
 (0)