summaryrefslogtreecommitdiff
path: root/src/mongo/db/logical_time_validator_test.cpp
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2017-09-27 23:23:24 -0400
committerMisha Tyulenev <misha@mongodb.com>2017-09-27 23:23:46 -0400
commiteeee1e2b64f70e8487f017ba579f3ca861c81e4f (patch)
treee1452828e142748f1f03be61a00c32dbb3ed6bc1 /src/mongo/db/logical_time_validator_test.cpp
parent55637833c707998f685f997d43624c52cde99b45 (diff)
downloadmongo-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.cpp8
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());
}