From 5648117626cb60452aea8bdf51f88bd2180d8e62 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 21 Feb 2013 21:45:06 -0800 Subject: [PATCH] Add test for list_watchers() C++ interface Signed-off-by: David Zafman --- src/test/librados/watch_notify.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/librados/watch_notify.cc b/src/test/librados/watch_notify.cc index b2de96d1332c4..d6cb8a0cee3fe 100644 --- a/src/test/librados/watch_notify.cc +++ b/src/test/librados/watch_notify.cc @@ -1,5 +1,6 @@ #include "include/rados/librados.h" #include "include/rados/librados.hpp" +#include "include/rados/rados_types.h" #include "test/librados/test.h" #include @@ -61,6 +62,9 @@ TEST(LibRadosWatchNotify, WatchNotifyTestPP) { uint64_t handle; WatchNotifyTestCtx ctx; ASSERT_EQ(0, ioctx.watch("foo", 0, &handle, &ctx)); + std::list watches; + ASSERT_EQ(0, ioctx.list_watchers("foo", &watches)); + ASSERT_EQ(watches.size(), 1); bufferlist bl2; ASSERT_EQ(0, ioctx.notify("foo", 0, bl2)); TestAlarm alarm; -- 2.39.5