summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context_d_test_fixture.cpp
diff options
context:
space:
mode:
authorMisha Tyulenev <misha@mongodb.com>2017-02-28 11:01:46 -0500
committerMisha Tyulenev <misha@mongodb.com>2017-02-28 17:10:02 -0500
commit6fe8c420da0c1071bfb8abfd7e936059d4977472 (patch)
tree1467f8c7a80c4626200241e076f43fcbdefdf8d5 /src/mongo/db/service_context_d_test_fixture.cpp
parentc203a3be8076c4939011d03e958bc010422ac86d (diff)
downloadmongo-6fe8c420da0c1071bfb8abfd7e936059d4977472.tar.gz
SERVER-27773 add operationTime field to the command response
Diffstat (limited to 'src/mongo/db/service_context_d_test_fixture.cpp')
-rw-r--r--src/mongo/db/service_context_d_test_fixture.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/service_context_d_test_fixture.cpp b/src/mongo/db/service_context_d_test_fixture.cpp
index 268a7cee984..9d6087e066e 100644
--- a/src/mongo/db/service_context_d_test_fixture.cpp
+++ b/src/mongo/db/service_context_d_test_fixture.cpp
@@ -37,11 +37,13 @@
#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/curop.h"
#include "mongo/db/db_raii.h"
+#include "mongo/db/logical_clock.h"
#include "mongo/db/op_observer_noop.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
#include "mongo/db/service_context_d.h"
#include "mongo/db/storage/storage_options.h"
+#include "mongo/db/time_proof_service.h"
#include "mongo/stdx/memory.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/util/scopeguard.h"
@@ -51,6 +53,12 @@ namespace mongo {
void ServiceContextMongoDTest::setUp() {
Client::initThread(getThreadName().c_str());
ServiceContext* serviceContext = getServiceContext();
+
+ auto timeProofService = stdx::make_unique<TimeProofService>();
+ auto logicalClock =
+ stdx::make_unique<LogicalClock>(serviceContext, std::move(timeProofService), false);
+ LogicalClock::set(serviceContext, std::move(logicalClock));
+
if (!serviceContext->getGlobalStorageEngine()) {
// When using the "ephemeralForTest" storage engine, it is fine for the temporary directory
// to go away after the global storage engine is initialized.