summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2018-12-11 21:36:34 -0500
committerGregory Wlodarek <gregory.wlodarek@mongodb.com>2018-12-11 22:01:34 -0500
commit17532dff912ceb6233cd8d7db8c1b47e4859ffaf (patch)
tree353ec2d0b56de43958c03755038dca0d53fcd197 /src/mongo/dbtests
parent3b7720f9a4209e9b4b18f7d8e98f29b574775f76 (diff)
downloadmongo-17532dff912ceb6233cd8d7db8c1b47e4859ffaf.tar.gz
SERVER-38128 Start periodic runner before the storage engine
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/framework.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/dbtests/framework.cpp b/src/mongo/dbtests/framework.cpp
index b53b78b380c..b6e7145814b 100644
--- a/src/mongo/dbtests/framework.cpp
+++ b/src/mongo/dbtests/framework.cpp
@@ -54,6 +54,7 @@
#include "mongo/util/assert_util.h"
#include "mongo/util/exit.h"
#include "mongo/util/log.h"
+#include "mongo/util/periodic_runner_factory.h"
#include "mongo/util/scopeguard.h"
#include "mongo/util/version.h"
@@ -91,6 +92,12 @@ int runDbTests(int argc, char** argv) {
srand((unsigned)frameworkGlobalParams.seed);
+ // Set up the periodic runner for background job execution, which is required by the storage
+ // engine to be running beforehand.
+ auto runner = makePeriodicRunner(globalServiceContext);
+ runner->startup();
+ globalServiceContext->setPeriodicRunner(std::move(runner));
+
initializeStorageEngine(globalServiceContext, StorageEngineInitFlags::kNone);
auto registry = stdx::make_unique<OpObserverRegistry>();
registry->addObserver(stdx::make_unique<UUIDCatalogObserver>());