From: Mykola Golub Date: Thu, 27 Sep 2018 11:32:30 +0000 (+0300) Subject: test/rbd_mirror: race in WaitingOnLeaderReleaseLeader X-Git-Tag: v14.0.1~159^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=14f07dbd39899c1e38edb8b85dd2fa1313e9ca76;p=ceph.git test/rbd_mirror: race in WaitingOnLeaderReleaseLeader Fixes: http://tracker.ceph.com/issues/36236 Signed-off-by: Mykola Golub --- diff --git a/src/test/rbd_mirror/test_mock_InstanceWatcher.cc b/src/test/rbd_mirror/test_mock_InstanceWatcher.cc index da8d26de03195..ede548dc04306 100644 --- a/src/test/rbd_mirror/test_mock_InstanceWatcher.cc +++ b/src/test/rbd_mirror/test_mock_InstanceWatcher.cc @@ -908,8 +908,7 @@ TEST_F(TestMockInstanceWatcher_NotifySync, WaitingOnLeaderReleaseLeader) { C_SaferCond on_start_op_called; Context *on_start_ctx; - expect_throttler_start_op("sync_id", &on_start_op_called, - &on_start_ctx); + expect_throttler_start_op("sync_id", &on_start_op_called, &on_start_ctx); C_SaferCond on_start; instance_watcher1->notify_sync_request("sync_id", &on_start); ASSERT_EQ(0, on_start_op_called.wait()); @@ -917,10 +916,10 @@ TEST_F(TestMockInstanceWatcher_NotifySync, WaitingOnLeaderReleaseLeader) { std::vector throttler_queue = {on_start_ctx}; expect_throttler_destroy(&throttler_queue); instance_watcher1->handle_release_leader(); + expect_throttler_start_op("sync_id"); instance_watcher2->handle_acquire_leader(); instance_watcher1->handle_update_leader(instance_id2); - expect_throttler_start_op("sync_id"); ASSERT_EQ(0, on_start.wait()); C_SaferCond on_finish; expect_throttler_finish_op("sync_id", &on_finish);