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 Jan 15, 2025
1 parent 8a9e09d commit 47dfb11
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/unit/tls_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,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 Expand Up @@ -1832,8 +1836,12 @@ SEASTAR_THREAD_TEST_CASE(test_reload_certificates_with_only_shard0_notify) {
}

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 47dfb11

Please sign in to comment.