]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/librbd/operation/test_mock_DisableFeaturesRequest.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / test / librbd / operation / test_mock_DisableFeaturesRequest.cc
index ec374d518e96adb033f93d3f882904129062bfc4..171ac41a71a8f88b38c01a7f2feb4b4ea3fceaef 100644 (file)
@@ -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<MockOperationImageCtx> {
+  static void get_work_queue(CephContext*, MockContextWQ**) {
+  }
+};
+
 namespace image {
 
 template<>
@@ -88,6 +96,11 @@ public:
   }
 };
 
+template <>
+struct TypeTraits<MockOperationImageCtx> {
+  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) {