Skip to content

Commit 5c709c2

Browse files
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 1744b66 commit 5c709c2

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
@@ -1039,8 +1039,12 @@ SEASTAR_THREAD_TEST_CASE(test_reload_certificates) {
10391039
}
10401040

10411041
try {
1042-
f2.get();
1043-
BOOST_FAIL("should not reach");
1042+
auto res = f2.get();
1043+
// If the server completes sending data to the client
1044+
// during the handshake before the client has fully
1045+
// closed its connection, then the get() call will
1046+
// succeed by return an empty buffer indicating EOF
1047+
BOOST_REQUIRE(res.size() == 0);
10441048
} catch (...) {
10451049
// ok
10461050
}

0 commit comments

Comments
 (0)