summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Marks <gabriel.marks@mongodb.com>2020-06-24 15:26:44 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-25 19:17:46 +0000
commita8a66b7b36d7b936d99808884fccc49db61d5697 (patch)
tree66d417320d729fc42da8a94c978278ddd909ff6c /src
parent20c0cc8c93f9ce27207067b0776bad08f84b47d0 (diff)
downloadmongo-a8a66b7b36d7b936d99808884fccc49db61d5697.tar.gz
SERVER-47124 Add EndStartupOptionHandling as prependent to registering test commands
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/commands.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h
index 609371c6071..08af2938a79 100644
--- a/src/mongo/db/commands.h
+++ b/src/mongo/db/commands.h
@@ -1004,12 +1004,15 @@ CommandRegistry* globalCommandRegistry();
* Prefer this syntax to using MONGO_INITIALIZER directly.
* The created Command object is "leaked" intentionally, since it will register itself.
*/
-#define MONGO_REGISTER_TEST_COMMAND(CmdType) \
- MONGO_INITIALIZER(RegisterTestCommand_##CmdType)(InitializerContext*) { \
- if (getTestCommandsEnabled()) { \
- new CmdType(); \
- } \
- return Status::OK(); \
+#define MONGO_REGISTER_TEST_COMMAND(CmdType) \
+ MONGO_INITIALIZER_WITH_PREREQUISITES( \
+ RegisterTestCommand_##CmdType, \
+ (::mongo::defaultInitializerName().c_str(), "EndStartupOptionHandling")) \
+ (InitializerContext*) { \
+ if (getTestCommandsEnabled()) { \
+ new CmdType(); \
+ } \
+ return Status::OK(); \
}
} // namespace mongo