Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/neorados: timeout test won't reconnect at timeout #56982

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/test/neorados/watch_notify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class NeoRadosWatchNotifyTest : public NeoRadosTest {
const std::string notify_oid = "foo"s;
sys::error_code notify_err;
ceph::timespan notify_sleep = 0s;
bool should_reconnet = true;

asio::awaitable<void> handle_notify(uint64_t notify_id, uint64_t cookie,
uint64_t notifier_gid, buffer::list&& bl) {
Expand All @@ -73,6 +74,9 @@ class NeoRadosWatchNotifyTest : public NeoRadosTest {
std::cout << __func__ << " cookie " << cookie
<< " err " << ec.message() << std::endl;
ceph_assert(cookie > 1000);
if (!should_reconnet) {
co_return;
}
co_await rados().unwatch(cookie, pool(), asio::use_awaitable);
notify_cookies.erase(cookie);
notify_err = ec;
Expand Down Expand Up @@ -154,6 +158,7 @@ CORO_TEST_F(NeoRadosWatchNotify, WatchNotifyTimeout, NeoRadosWatchNotifyTest) {
sys::errc::timed_out);
std::cout << "Timed out." << std::endl;

should_reconnet = false; // Don't reconnect, we know we will timeout
EXPECT_TRUE(rados().check_watch(handle));
co_await rados().unwatch(handle, pool(), asio::use_awaitable);

Expand Down