From 970ace98679d499f8821c8775dee875d3070d79f Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Tue, 24 Apr 2018 18:44:21 -0400 Subject: SERVER-34794 Construct the global ServiceContext inside a MONGO_INITIALIZER --- src/mongo/unittest/integration_test_main.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/mongo/unittest/integration_test_main.cpp') diff --git a/src/mongo/unittest/integration_test_main.cpp b/src/mongo/unittest/integration_test_main.cpp index 382ea69b087..b4087176542 100644 --- a/src/mongo/unittest/integration_test_main.cpp +++ b/src/mongo/unittest/integration_test_main.cpp @@ -71,14 +71,7 @@ ConnectionString getFixtureConnectionString() { int main(int argc, char** argv, char** envp) { setupSynchronousSignalHandlers(); - - ::mongo::ServiceContext* serviceContext = nullptr; - if (::mongo::hasServiceContextFactory()) { - ::mongo::setGlobalServiceContext(::mongo::createServiceContext()); - serviceContext = ::mongo::getGlobalServiceContext(); - } - runGlobalInitializersOrDie(argc, argv, envp, serviceContext); - + runGlobalInitializersOrDie(argc, argv, envp); quickExit(unittest::Suite::run(std::vector(), "", 1)); } -- cgit v1.2.1