From 2cbad1b17f047889c7ad34059e7e815778b2be8f Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 11 Mar 2014 14:17:47 -0700 Subject: [PATCH] test/librados/watch_notify: create foo before watching Signed-off-by: Samuel Just --- src/test/librados/watch_notify.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/librados/watch_notify.cc b/src/test/librados/watch_notify.cc index b6216a23356e9..8616b5cb16ed4 100644 --- a/src/test/librados/watch_notify.cc +++ b/src/test/librados/watch_notify.cc @@ -70,6 +70,13 @@ TEST_F(LibRadosWatchNotifyPP, WatchNotifyTimeoutTestPP) { ioctx.set_notify_timeout(1); uint64_t handle; WatchNotifyTestCtx ctx; + + char buf[128]; + memset(buf, 0xcc, sizeof(buf)); + bufferlist bl1; + bl1.append(buf, sizeof(buf)); + ASSERT_EQ((int)sizeof(buf), ioctx.write("foo", bl1, sizeof(buf), 0)); + ASSERT_EQ(0, ioctx.watch("foo", 0, &handle, &ctx)); sem_destroy(&sem); } -- 2.39.5