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/repl | |
parent | 6dd301449ec7a48e35a7114e93b888df9958217f (diff) | |
download | mongo-214379825c248f5a5e5f0a01ad9863b900faaf30.tar.gz |
SERVER-48650 Gave the ClockSourceMock a global impl
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/initial_syncer_test.cpp | 7 | ||||
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_test_fixture.cpp | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/db/repl/initial_syncer_test.cpp b/src/mongo/db/repl/initial_syncer_test.cpp index 4180a2a5b74..455dfd10d6a 100644 --- a/src/mongo/db/repl/initial_syncer_test.cpp +++ b/src/mongo/db/repl/initial_syncer_test.cpp @@ -67,6 +67,7 @@ #include "mongo/executor/network_interface_mock.h" #include "mongo/executor/thread_pool_task_executor_test_fixture.h" #include "mongo/platform/mutex.h" +#include "mongo/util/clock_source_mock.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/fail_point.h" @@ -340,10 +341,8 @@ protected: }; auto* service = getGlobalServiceContext(); - service->setFastClockSource( - std::make_unique<executor::NetworkInterfaceMockClockSource>(getNet())); - service->setPreciseClockSource( - std::make_unique<executor::NetworkInterfaceMockClockSource>(getNet())); + service->setFastClockSource(std::make_unique<ClockSourceMock>()); + service->setPreciseClockSource(std::make_unique<ClockSourceMock>()); ThreadPool::Options dbThreadPoolOptions; dbThreadPoolOptions.poolName = "dbthread"; dbThreadPoolOptions.minThreads = 1U; diff --git a/src/mongo/db/repl/replication_coordinator_test_fixture.cpp b/src/mongo/db/repl/replication_coordinator_test_fixture.cpp index f2147923ed9..e54eda1b6f1 100644 --- a/src/mongo/db/repl/replication_coordinator_test_fixture.cpp +++ b/src/mongo/db/repl/replication_coordinator_test_fixture.cpp @@ -153,9 +153,8 @@ void ReplCoordTest::init() { replicationProcess, _storageInterface, seed); - service->setFastClockSource(std::make_unique<executor::NetworkInterfaceMockClockSource>(_net)); - service->setPreciseClockSource( - std::make_unique<executor::NetworkInterfaceMockClockSource>(_net)); + service->setFastClockSource(std::make_unique<ClockSourceMock>()); + service->setPreciseClockSource(std::make_unique<ClockSourceMock>()); } void ReplCoordTest::init(const ReplSettings& settings) { |