Skip to content

Commit 245d15c

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 0336795 commit 245d15c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/unit/tls_test.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,8 +1069,12 @@ SEASTAR_THREAD_TEST_CASE(test_reload_certificates) {
10691069
}
10701070

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

0 commit comments

Comments
 (0)