diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2018-09-14 15:09:35 -0400 |
---|---|---|
committer | Ben Caimano <ben.caimano@10gen.com> | 2018-10-12 13:57:39 -0400 |
commit | 9739f4e5974ef70daac2190acc8db90d6e8311d1 (patch) | |
tree | cbc8859531dd0c66f18e86d8cc6a1e75a3eaecfd | |
parent | e41a26ed167483f40973a896743a5ce5c5eab575 (diff) | |
download | mongo-9739f4e5974ef70daac2190acc8db90d6e8311d1.tar.gz |
SERVER-37149 Remove deadlock in ScheduleBeforeStartupTest
(cherry picked from commit 82b341a24fdf50fef468fc64b58b55818943779c)
-rw-r--r-- | src/mongo/util/periodic_runner_impl_test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/util/periodic_runner_impl_test.cpp b/src/mongo/util/periodic_runner_impl_test.cpp index fa642bbea5f..c26204e7863 100644 --- a/src/mongo/util/periodic_runner_impl_test.cpp +++ b/src/mongo/util/periodic_runner_impl_test.cpp @@ -134,8 +134,10 @@ TEST_F(PeriodicRunnerImplTestNoSetup, ScheduleBeforeStartupTest) { clockSource().advance(interval); - stdx::unique_lock<stdx::mutex> lk(mutex); - cv.wait(lk, [&count] { return count > 0; }); + { + stdx::unique_lock<stdx::mutex> lk(mutex); + cv.wait(lk, [&count] { return count > 0; }); + } tearDown(); } |