} // anonymous namespace
using ::testing::_;
+using ::testing::AtLeast;
using ::testing::Invoke;
using ::testing::StrEq;
using ::testing::WithArg;
};
TEST_F(TestMirroringWatcher, ModeUpdated) {
- EXPECT_CALL(*m_image_watcher, handle_mode_updated(cls::rbd::MIRROR_MODE_DISABLED));
+ EXPECT_CALL(*m_image_watcher,
+ handle_mode_updated(cls::rbd::MIRROR_MODE_DISABLED))
+ .Times(AtLeast(1));
C_SaferCond ctx;
- MockMirroringWatcher::notify_mode_updated(m_ioctx, cls::rbd::MIRROR_MODE_DISABLED, &ctx);
+ MockMirroringWatcher::notify_mode_updated(
+ m_ioctx, cls::rbd::MIRROR_MODE_DISABLED, &ctx);
ASSERT_EQ(0, ctx.wait());
}
EXPECT_CALL(*m_image_watcher,
handle_image_updated(cls::rbd::MIRROR_IMAGE_STATE_ENABLED,
StrEq("image id"),
- StrEq("global image id")));
+ StrEq("global image id")))
+ .Times(AtLeast(1));
C_SaferCond ctx;
- MockMirroringWatcher::notify_image_updated(m_ioctx,
- cls::rbd::MIRROR_IMAGE_STATE_ENABLED,
- "image id", "global image id", &ctx);
+ MockMirroringWatcher::notify_image_updated(
+ m_ioctx, cls::rbd::MIRROR_IMAGE_STATE_ENABLED, "image id",
+ "global image id", &ctx);
ASSERT_EQ(0, ctx.wait());
}