summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context_d_test_fixture.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2016-12-06 15:13:17 -0500
committerBenety Goh <benety@mongodb.com>2017-01-05 10:30:27 -0500
commit3a47f68605ebc00bbbe6cfb80501cf8a87bf5288 (patch)
tree2d41d435d1de6fa4b6da7a8de4a605bd50fe5c32 /src/mongo/db/service_context_d_test_fixture.cpp
parent507f0d336f65c8f02b57a8c09d82257e5a54cda0 (diff)
downloadmongo-3a47f68605ebc00bbbe6cfb80501cf8a87bf5288.tar.gz
SERVER-27301 converted OpObserver into an interface. ServiceContext should always return a valid OpObserver implementation.
(cherry picked from commit b666c293b8dee59b0bb8926afafc6eebf9c7d21c)
Diffstat (limited to 'src/mongo/db/service_context_d_test_fixture.cpp')
-rw-r--r--src/mongo/db/service_context_d_test_fixture.cpp3
1 files changed, 3 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 74fc3872d91..268a7cee984 100644
--- a/src/mongo/db/service_context_d_test_fixture.cpp
+++ b/src/mongo/db/service_context_d_test_fixture.cpp
@@ -37,10 +37,12 @@
#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/curop.h"
#include "mongo/db/db_raii.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/stdx/memory.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/util/scopeguard.h"
@@ -58,6 +60,7 @@ void ServiceContextMongoDTest::setUp() {
storageGlobalParams.engineSetByUser = true;
checked_cast<ServiceContextMongoD*>(getGlobalServiceContext())->createLockFile();
serviceContext->initializeGlobalStorageEngine();
+ serviceContext->setOpObserver(stdx::make_unique<OpObserverNoop>());
}
}