From: Jason Dillaman Date: Tue, 3 Feb 2015 02:22:48 +0000 (-0500) Subject: librados_test_stub: added Rados::watch_flush X-Git-Tag: v0.93~103^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3592%2Fhead;p=ceph.git librados_test_stub: added Rados::watch_flush RBD now uses this method, so it was added to the test stub. Signed-off-by: Jason Dillaman --- diff --git a/src/test/librados_test_stub/LibradosTestStub.cc b/src/test/librados_test_stub/LibradosTestStub.cc index 45d02ea42754..4f83f6ee8cff 100644 --- a/src/test/librados_test_stub/LibradosTestStub.cc +++ b/src/test/librados_test_stub/LibradosTestStub.cc @@ -790,6 +790,11 @@ int Rados::wait_for_latest_osdmap() { return impl->wait_for_latest_osdmap(); } +int Rados::watch_flush() { + TestRadosClient *impl = reinterpret_cast(client); + return impl->watch_flush(); +} + WatchCtx::~WatchCtx() { } diff --git a/src/test/librados_test_stub/TestMemRadosClient.cc b/src/test/librados_test_stub/TestMemRadosClient.cc index a225702adabc..8abfa263e051 100644 --- a/src/test/librados_test_stub/TestMemRadosClient.cc +++ b/src/test/librados_test_stub/TestMemRadosClient.cc @@ -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 diff --git a/src/test/librados_test_stub/TestMemRadosClient.h b/src/test/librados_test_stub/TestMemRadosClient.h index 5031d8c4ce87..df4eb18a72a6 100644 --- a/src/test/librados_test_stub/TestMemRadosClient.h +++ b/src/test/librados_test_stub/TestMemRadosClient.h @@ -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(); diff --git a/src/test/librados_test_stub/TestRadosClient.h b/src/test/librados_test_stub/TestRadosClient.h index bfccad6d9981..22b1fee8eb32 100644 --- a/src/test/librados_test_stub/TestRadosClient.h +++ b/src/test/librados_test_stub/TestRadosClient.h @@ -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; }