]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rbd_mirror: race in WaitingOnLeaderReleaseLeader 24551/head
authorMykola Golub <mgolub@suse.com>
Thu, 27 Sep 2018 11:32:30 +0000 (14:32 +0300)
committerPrashant D <pdhange@redhat.com>
Thu, 11 Oct 2018 22:43:16 +0000 (18:43 -0400)
Fixes: http://tracker.ceph.com/issues/36236
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 14f07dbd39899c1e38edb8b85dd2fa1313e9ca76)

src/test/rbd_mirror/test_mock_InstanceWatcher.cc

index 25862112267a13ace2da713d35cc00862662d28f..0d74c00b57e76d1584a6228e1f52f5396fb38842 100644 (file)
@@ -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<Context *> 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);