Skip to content

Commit

Permalink
tests: ceph_test_rados_api_watch_notify: watch2Delete reconnect
Browse files Browse the repository at this point in the history
During test LibRadosWatchNotify.Watch2Delete rados_watch_check can return error -102 if reconnect happened, in that case Broken pipe reconnect and -102 returned

Fixes: https://tracker.ceph.com/issues/51307
Signed-off-by: Nitzan Mordechai <[email protected]>
Signed-off-by: NitzanMordhai <[email protected]>
  • Loading branch information
NitzanMordhai committed Mar 18, 2022
1 parent 0b44878 commit 8c8414a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/librados/watch_notify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ TEST_F(LibRadosWatchNotify, Watch2Delete) {
}
ASSERT_TRUE(left > 0);
ASSERT_EQ(-ENOTCONN, notify_err);
ASSERT_EQ(-ENOTCONN, rados_watch_check(ioctx, handle));
int rados_watch_check_err = rados_watch_check(ioctx, handle);
// We may hit ENOENT due to socket failure and a forced reconnect
EXPECT_TRUE(rados_watch_check_err == -ENOTCONN || rados_watch_check_err == -ENOENT)
<< "Where rados_watch_check_err = " << rados_watch_check_err;
rados_unwatch2(ioctx, handle);
rados_watch_flush(cluster);
}
Expand Down

0 comments on commit 8c8414a

Please sign in to comment.