Skip to content

Commit

Permalink
tls/test: Updated test_reload_certificates
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
michael-redpanda committed Dec 6, 2024
1 parent 1744b66 commit 5c709c2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/unit/tls_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,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
}
Expand Down

0 comments on commit 5c709c2

Please sign in to comment.