]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librados/watch_notify: create foo before watching 1441/head
authorSamuel Just <sam.just@inktank.com>
Tue, 11 Mar 2014 21:17:47 +0000 (14:17 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 12 Mar 2014 23:26:48 +0000 (16:26 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/test/librados/watch_notify.cc

index b6216a23356e94b6da103c9e0e50809125d82f1d..8616b5cb16ed433029967b0fc4d599e24bab7aa0 100644 (file)
@@ -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);
 }