summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@10gen.com>2018-09-14 15:09:35 -0400
committerBen Caimano <ben.caimano@10gen.com>2018-10-12 13:57:39 -0400
commit9739f4e5974ef70daac2190acc8db90d6e8311d1 (patch)
treecbc8859531dd0c66f18e86d8cc6a1e75a3eaecfd
parente41a26ed167483f40973a896743a5ce5c5eab575 (diff)
downloadmongo-9739f4e5974ef70daac2190acc8db90d6e8311d1.tar.gz
SERVER-37149 Remove deadlock in ScheduleBeforeStartupTest
(cherry picked from commit 82b341a24fdf50fef468fc64b58b55818943779c)
-rw-r--r--src/mongo/util/periodic_runner_impl_test.cpp6
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();
}