X-Git-Url: https://git.proxmox.com/?p=ceph.git;a=blobdiff_plain;f=ceph%2Fsrc%2Ftest%2Flibrbd%2Foperation%2Ftest_mock_DisableFeaturesRequest.cc;h=171ac41a71a8f88b38c01a7f2feb4b4ea3fceaef;hp=ec374d518e96adb033f93d3f882904129062bfc4;hb=f67539c23b11f3b8a2ecaeeddf7a403ae1c442a8;hpb=64a4c04e6850c6d9086e4c37f57c4eada541b05e diff --git a/ceph/src/test/librbd/operation/test_mock_DisableFeaturesRequest.cc b/ceph/src/test/librbd/operation/test_mock_DisableFeaturesRequest.cc index ec374d518..171ac41a7 100644 --- a/ceph/src/test/librbd/operation/test_mock_DisableFeaturesRequest.cc +++ b/ceph/src/test/librbd/operation/test_mock_DisableFeaturesRequest.cc @@ -7,12 +7,14 @@ #include "test/librbd/mock/MockJournalPolicy.h" #include "cls/rbd/cls_rbd_client.h" #include "librbd/internal.h" +#include "librbd/Journal.h" #include "librbd/image/SetFlagsRequest.h" #include "librbd/io/AioCompletion.h" #include "librbd/mirror/DisableRequest.h" #include "librbd/journal/RemoveRequest.h" #include "librbd/journal/StandardPolicy.h" #include "librbd/journal/Types.h" +#include "librbd/journal/TypeTraits.h" #include "librbd/object_map/RemoveRequest.h" #include "librbd/operation/DisableFeaturesRequest.h" #include "gmock/gmock.h" @@ -29,6 +31,12 @@ struct MockOperationImageCtx : public MockImageCtx { } // anonymous namespace +template<> +struct Journal { + static void get_work_queue(CephContext*, MockContextWQ**) { + } +}; + namespace image { template<> @@ -88,6 +96,11 @@ public: } }; +template <> +struct TypeTraits { + typedef librbd::MockContextWQ ContextWQ; +}; + } // namespace journal namespace mirror { @@ -204,12 +217,12 @@ public: } void expect_block_writes(MockOperationImageCtx &mock_image_ctx) { - EXPECT_CALL(*mock_image_ctx.io_work_queue, block_writes(_)) + EXPECT_CALL(*mock_image_ctx.io_image_dispatcher, block_writes(_)) .WillOnce(CompleteContext(0, mock_image_ctx.image_ctx->op_work_queue)); } void expect_unblock_writes(MockOperationImageCtx &mock_image_ctx) { - EXPECT_CALL(*mock_image_ctx.io_work_queue, unblock_writes()).Times(1); + EXPECT_CALL(*mock_image_ctx.io_image_dispatcher, unblock_writes()).Times(1); } void expect_verify_lock_ownership(MockOperationImageCtx &mock_image_ctx) {