diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-07-23 21:59:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-28 20:57:56 +0000 |
commit | 214379825c248f5a5e5f0a01ad9863b900faaf30 (patch) | |
tree | 077a4844ec0daaf1a738933920525cde7d440131 /src/mongo/db/service_context_test_fixture.cpp | |
parent | 6dd301449ec7a48e35a7114e93b888df9958217f (diff) | |
download | mongo-214379825c248f5a5e5f0a01ad9863b900faaf30.tar.gz |
SERVER-48650 Gave the ClockSourceMock a global impl
Diffstat (limited to 'src/mongo/db/service_context_test_fixture.cpp')
-rw-r--r-- | src/mongo/db/service_context_test_fixture.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/service_context_test_fixture.cpp b/src/mongo/db/service_context_test_fixture.cpp index 3a1a8b4edb5..3ba046db3de 100644 --- a/src/mongo/db/service_context_test_fixture.cpp +++ b/src/mongo/db/service_context_test_fixture.cpp @@ -37,11 +37,18 @@ #include "mongo/db/client.h" #include "mongo/db/op_observer_registry.h" #include "mongo/util/assert_util.h" +#include "mongo/util/clock_source_mock.h" #include "mongo/util/diagnostic_info.h" namespace mongo { ScopedGlobalServiceContextForTest::ScopedGlobalServiceContextForTest() { + { + // Reset the global clock source + ClockSourceMock clkSource; + clkSource.reset(); + } + auto serviceContext = [] { auto serviceContext = ServiceContext::make(); auto serviceContextPtr = serviceContext.get(); |