summaryrefslogtreecommitdiff
path: root/src/mongo/util/periodic_runner_impl_test.cpp
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-09-17 11:49:55 -0400
commit82b341a24fdf50fef468fc64b58b55818943779c (patch)
treec7ed286ad819b74c5124764bbe1da8360070a2ad /src/mongo/util/periodic_runner_impl_test.cpp
parent82db931d8de1b88a9352d475de3a1f1610242d25 (diff)
downloadmongo-82b341a24fdf50fef468fc64b58b55818943779c.tar.gz
SERVER-37149 Remove deadlock in ScheduleBeforeStartupTest
Diffstat (limited to 'src/mongo/util/periodic_runner_impl_test.cpp')
-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 8e341f8e5b6..7deeb18b72d 100644
--- a/src/mongo/util/periodic_runner_impl_test.cpp
+++ b/src/mongo/util/periodic_runner_impl_test.cpp
@@ -282,8 +282,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();
}