]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librbd: fix ioctx reference leak in DetachChildRequest mock tests 23827/head
authorMykola Golub <mgolub@suse.com>
Thu, 30 Aug 2018 16:10:58 +0000 (19:10 +0300)
committerMykola Golub <mgolub@suse.com>
Thu, 30 Aug 2018 16:15:48 +0000 (19:15 +0300)
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/test/librbd/image/test_mock_DetachChildRequest.cc

index c63ae5ca81b32759720a2ed8c84e5355a8fd175c..2fea0b461f8546cb1b56505709927af328ba69a1 100644 (file)
@@ -71,7 +71,7 @@ public:
     auto rados_client = (*io_ctx_impl)->get_mock_rados_client();
 
     EXPECT_CALL(*rados_client, create_ioctx(_, _))
-      .WillOnce(Return(*io_ctx_impl));
+      .WillOnce(DoAll(GetReference(*io_ctx_impl), Return(*io_ctx_impl)));
   }
 
   void expect_child_detach(MockImageCtx &mock_image_ctx,