From: Sage Weil Date: Thu, 13 Nov 2014 00:33:46 +0000 (-0800) Subject: ceph_test_rados_api_watch_notify: verify notify after missed notify works X-Git-Tag: v0.91~118 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c6076b09f28c5239e454ec1e315c79eb1b5cf2e;p=ceph.git ceph_test_rados_api_watch_notify: verify notify after missed notify works Signed-off-by: Sage Weil --- diff --git a/src/test/librados/watch_notify.cc b/src/test/librados/watch_notify.cc index 3b7152de75dc..cfe5c777ec7e 100644 --- a/src/test/librados/watch_notify.cc +++ b/src/test/librados/watch_notify.cc @@ -218,7 +218,17 @@ TEST_F(LibRadosWatchNotify, WatchNotify2TimeoutTest) { int wait = 10; while (!notify_failed && --wait) sleep(1); - ASSERT_TRUE(notify_failed); + ASSERT_TRUE(notify_failed); + + // we should get the next notify, though! + notify_failed = false; + notify_sleep = 0; + notify_cookies.clear(); + ASSERT_EQ(0, rados_notify2(ioctx, notify_oid, + "notify", 6, 30000, // 30s + &reply_buf, &reply_buf_len)); + ASSERT_EQ(1u, notify_cookies.size()); + rados_unwatch(ioctx, notify_oid, handle); }