]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_rados_api_watch_notify: verify notify after missed notify works
authorSage Weil <sage@redhat.com>
Thu, 13 Nov 2014 00:33:46 +0000 (16:33 -0800)
committerSage Weil <sage@redhat.com>
Thu, 4 Dec 2014 18:32:39 +0000 (10:32 -0800)
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/librados/watch_notify.cc

index 3b7152de75dc7d08f1844a2f4d8a82116c539bfd..cfe5c777ec7e00cc4d42222f1409d2cbb66efa3f 100644 (file)
@@ -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);
 }