From 6071142f5230b952e5e13247e50adb289ffd64cb Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Mon, 2 Feb 2015 21:22:48 -0500 Subject: [PATCH] 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 --- src/test/librados_test_stub/LibradosTestStub.cc | 5 +++++ src/test/librados_test_stub/TestMemRadosClient.cc | 4 ++++ src/test/librados_test_stub/TestMemRadosClient.h | 1 + src/test/librados_test_stub/TestRadosClient.h | 2 ++ 4 files changed, 12 insertions(+) diff --git a/src/test/librados_test_stub/LibradosTestStub.cc b/src/test/librados_test_stub/LibradosTestStub.cc index 45d02ea427549..4f83f6ee8cff6 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 a225702adabc6..8abfa263e051a 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 5031d8c4ce877..df4eb18a72a6e 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 bfccad6d99810..22b1fee8eb327 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; } -- 2.39.5