]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados_test_stub: added Rados::watch_flush 3592/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 3 Feb 2015 02:22:48 +0000 (21:22 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 3 Feb 2015 11:36:12 +0000 (06:36 -0500)
RBD now uses this method, so it was added to the test stub.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/test/librados_test_stub/LibradosTestStub.cc
src/test/librados_test_stub/TestMemRadosClient.cc
src/test/librados_test_stub/TestMemRadosClient.h
src/test/librados_test_stub/TestRadosClient.h

index 45d02ea4275499f0aafc6f4a83987b0a605a4da7..4f83f6ee8cff6d195446cd578c78ec0fe8a3a34a 100644 (file)
@@ -790,6 +790,11 @@ int Rados::wait_for_latest_osdmap() {
   return impl->wait_for_latest_osdmap();
 }
 
+int Rados::watch_flush() {
+  TestRadosClient *impl = reinterpret_cast<TestRadosClient*>(client);
+  return impl->watch_flush();
+}
+
 WatchCtx::~WatchCtx() {
 }
 
index a225702adabc6466e509d8c7ca2f11f82da8dd9a..8abfa263e051aa440e788f6ed12d9a3697d9db83 100644 (file)
@@ -115,4 +115,8 @@ int TestMemRadosClient::pool_reverse_lookup(int64_t id, std::string *name) {
   return -ENOENT;
 }
 
+int TestMemRadosClient::watch_flush() {
+  return 0;
+}
+
 } // namespace librados
index 5031d8c4ce8779abd5a151ffda59acf2b62fec53..df4eb18a72a6e0106d5827fbcb004773840b4499 100644 (file)
@@ -78,6 +78,7 @@ public:
   virtual int64_t pool_lookup(const std::string &name);
   virtual int pool_reverse_lookup(int64_t id, std::string *name);
 
+  virtual int watch_flush();
 protected:
   ~TestMemRadosClient();
 
index bfccad6d998108fa207a3a89b39d09b308a73f53..22b1fee8eb327fefd672f1aefcb9091c1eaaa589 100644 (file)
@@ -63,6 +63,8 @@ public:
   virtual int64_t pool_lookup(const std::string &name) = 0;
   virtual int pool_reverse_lookup(int64_t id, std::string *name) = 0;
 
+  virtual int watch_flush() = 0;
+
   TestWatchNotify &get_watch_notify() {
     return m_watch_notify;
   }