diff options
author | Misha Tyulenev <misha@mongodb.com> | 2017-09-27 23:23:24 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2017-09-27 23:23:46 -0400 |
commit | eeee1e2b64f70e8487f017ba579f3ca861c81e4f (patch) | |
tree | e1452828e142748f1f03be61a00c32dbb3ed6bc1 /src/mongo/db/logical_time_validator_test.cpp | |
parent | 55637833c707998f685f997d43624c52cde99b45 (diff) | |
download | mongo-eeee1e2b64f70e8487f017ba579f3ca861c81e4f.tar.gz |
SERVER-30977 add clusterTime to standalone replica set
Diffstat (limited to 'src/mongo/db/logical_time_validator_test.cpp')
-rw-r--r-- | src/mongo/db/logical_time_validator_test.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/logical_time_validator_test.cpp b/src/mongo/db/logical_time_validator_test.cpp index 8292ee75db4..2f029d272c9 100644 --- a/src/mongo/db/logical_time_validator_test.cpp +++ b/src/mongo/db/logical_time_validator_test.cpp @@ -29,6 +29,7 @@ #include "mongo/platform/basic.h" #include "mongo/bson/timestamp.h" +#include "mongo/db/keys_collection_client_sharded.h" #include "mongo/db/keys_collection_manager.h" #include "mongo/db/keys_collection_manager_sharding.h" #include "mongo/db/logical_clock.h" @@ -66,13 +67,14 @@ protected: auto clockSource = stdx::make_unique<ClockSourceMock>(); operationContext()->getServiceContext()->setFastClockSource(std::move(clockSource)); - auto catalogClient = Grid::get(operationContext())->catalogClient(); + auto catalogClient = stdx::make_unique<KeysCollectionClientSharded>( + Grid::get(operationContext())->catalogClient()); const LogicalTime currentTime(LogicalTime(Timestamp(1, 0))); LogicalClock::get(operationContext())->setClusterTimeFromTrustedSource(currentTime); - _keyManager = - std::make_shared<KeysCollectionManagerSharding>("dummy", catalogClient, Seconds(1000)); + _keyManager = std::make_shared<KeysCollectionManagerSharding>( + "dummy", std::move(catalogClient), Seconds(1000)); _validator = stdx::make_unique<LogicalTimeValidator>(_keyManager); _validator->init(operationContext()->getServiceContext()); } |