]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rbd-mirror: fix gmock warnings during snapshot-based replayer tests
authorJason Dillaman <dillaman@redhat.com>
Mon, 6 Apr 2020 18:37:04 +0000 (14:37 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 28 Apr 2020 18:52:10 +0000 (20:52 +0200)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 6a342bb5e01fea205088592128f62b55261408bf)

src/test/rbd_mirror/image_replayer/snapshot/test_mock_Replayer.cc

index cfbc675a6b2288ece01f99fffe82d253955dd52a..cc3baba29cbab12ecdbfc541cbf8e37ffc695957 100644 (file)
@@ -875,6 +875,7 @@ TEST_F(TestMockImageReplayerSnapshotReplayer, InterruptedSync) {
   expect_mirror_image_snapshot_set_copy_progress(
     mock_local_image_ctx, 11, true, 123, 0);
   expect_notify_update(mock_local_image_ctx);
+  expect_notify_sync_complete(mock_instance_watcher, mock_local_image_ctx.id);
 
   // idle
   expect_load_image_meta(mock_image_meta, false, 0);
@@ -960,6 +961,7 @@ TEST_F(TestMockImageReplayerSnapshotReplayer, RemoteImageDemoted) {
   expect_mirror_image_snapshot_set_copy_progress(
     mock_local_image_ctx, 11, true, 0, 0);
   expect_notify_update(mock_local_image_ctx);
+  expect_notify_sync_complete(mock_instance_watcher, mock_local_image_ctx.id);
 
   // idle
   expect_load_image_meta(mock_image_meta, false, 0);
@@ -1704,6 +1706,7 @@ TEST_F(TestMockImageReplayerSnapshotReplayer, CopyImageError) {
   MockImageCopyRequest mock_image_copy_request;
   expect_image_copy(mock_image_copy_request, 0, 1, 0, {},
                     {{1, CEPH_NOSNAP}}, -EINVAL);
+  expect_notify_sync_complete(mock_instance_watcher, mock_local_image_ctx.id);
 
   // wake-up replayer
   update_watch_ctx->handle_notify();
@@ -1778,6 +1781,7 @@ TEST_F(TestMockImageReplayerSnapshotReplayer, UpdateNonPrimarySnapshotError) {
   expect_apply_image_state(mock_apply_state_request, 0);
   expect_mirror_image_snapshot_set_copy_progress(
     mock_local_image_ctx, 11, true, 0, -EINVAL);
+  expect_notify_sync_complete(mock_instance_watcher, mock_local_image_ctx.id);
 
   // wake-up replayer
   update_watch_ctx->handle_notify();