summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-05-14 16:34:53 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2018-05-16 15:12:06 -0400
commit373aae274364751eec424a3665c50b53b06f6746 (patch)
tree131d1bed40e861b7b1f84b87f3af9dbf6c10a3f3 /src/mongo/s
parentdef040cc178a7726559e7796557c98384119b16e (diff)
downloadmongo-373aae274364751eec424a3665c50b53b06f6746.tar.gz
SERVER-34653 MONGO_REGISTER_TEST_COMMAND
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/commands/cluster_multicast.cpp7
-rw-r--r--src/mongo/s/commands/cluster_restart_catalog_command.cpp8
2 files changed, 2 insertions, 13 deletions
diff --git a/src/mongo/s/commands/cluster_multicast.cpp b/src/mongo/s/commands/cluster_multicast.cpp
index 54991980075..d1fcd3cc729 100644
--- a/src/mongo/s/commands/cluster_multicast.cpp
+++ b/src/mongo/s/commands/cluster_multicast.cpp
@@ -147,12 +147,7 @@ public:
}
};
-MONGO_INITIALIZER(RegisterMulticast)(InitializerContext* context) {
- if (getTestCommandsEnabled()) {
- new MulticastCmd();
- }
- return Status::OK();
-}
+MONGO_REGISTER_TEST_COMMAND(MulticastCmd);
} // namespace
} // namespace mongo
diff --git a/src/mongo/s/commands/cluster_restart_catalog_command.cpp b/src/mongo/s/commands/cluster_restart_catalog_command.cpp
index b91259a8de6..814846afdbc 100644
--- a/src/mongo/s/commands/cluster_restart_catalog_command.cpp
+++ b/src/mongo/s/commands/cluster_restart_catalog_command.cpp
@@ -89,13 +89,7 @@ public:
}
};
-MONGO_INITIALIZER(RegisterClusterRestartCatalogCommand)(InitializerContext* ctx) {
- if (getTestCommandsEnabled()) {
- // Leaked intentionally: a Command registers itself when constructed.
- new ClusterRestartCatalogCmd();
- }
- return Status::OK();
-}
+MONGO_REGISTER_TEST_COMMAND(ClusterRestartCatalogCmd);
} // namespace
} // namespace mongo