From b8b8f9dcf7210f8ca5db7794f388747ccb42a41c Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Thu, 18 Aug 2011 15:06:54 -0700 Subject: [PATCH] add WatchNotifyTimeoutTestPP Signed-off-by: Colin McCabe --- src/test/rados-api/watch_notify.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/test/rados-api/watch_notify.cc b/src/test/rados-api/watch_notify.cc index 1fceee4e8075b..88dcabfa3bc72 100644 --- a/src/test/rados-api/watch_notify.cc +++ b/src/test/rados-api/watch_notify.cc @@ -70,3 +70,19 @@ TEST(LibRadosWatchNotify, WatchNotifyTestPP) { ASSERT_EQ(0, destroy_one_pool_pp(pool_name, cluster)); sem_destroy(&sem); } + +TEST(LibRadosWatchNotify, WatchNotifyTimeoutTestPP) { + ASSERT_EQ(0, sem_init(&sem, 0, 0)); + Rados cluster; + std::string pool_name = get_temp_pool_name(); + ASSERT_EQ("", create_one_pool_pp(pool_name, cluster)); + IoCtx ioctx; + cluster.ioctx_create(pool_name.c_str(), ioctx); + ioctx.set_notify_timeout(1); + uint64_t handle; + WatchNotifyTestCtx ctx; + ASSERT_EQ(0, ioctx.watch("foo", 0, &handle, &ctx)); + ioctx.close(); + ASSERT_EQ(0, destroy_one_pool_pp(pool_name, cluster)); + sem_destroy(&sem); +} -- 2.39.5