diff options
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()); } |