diff options
author | Pavi Vetriselvan <pvselvan@umich.edu> | 2018-05-01 13:19:51 -0400 |
---|---|---|
committer | Pavi Vetriselvan <pvselvan@umich.edu> | 2018-05-01 13:22:19 -0400 |
commit | c875d517f91f0dfe4f42c95d38e68012d16756a2 (patch) | |
tree | dab1fe343ea8db046a322b321eb5a714a0a7a5e5 /src/mongo/db/commands/do_txn_cmd.cpp | |
parent | cd5653b7c9ab89db8c1770714b269b7b00609551 (diff) | |
download | mongo-c875d517f91f0dfe4f42c95d38e68012d16756a2.tar.gz |
SERVER-33031 make doTxn a test command
Diffstat (limited to 'src/mongo/db/commands/do_txn_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/do_txn_cmd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/commands/do_txn_cmd.cpp b/src/mongo/db/commands/do_txn_cmd.cpp index 9d87249fa6e..033669f7132 100644 --- a/src/mongo/db/commands/do_txn_cmd.cpp +++ b/src/mongo/db/commands/do_txn_cmd.cpp @@ -42,6 +42,7 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/commands/oplog_application_checks.h" +#include "mongo/db/commands/test_commands_enabled.h" #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" @@ -163,8 +164,14 @@ public: return doTxnStatus; } +}; -} doTxnCmd; +MONGO_INITIALIZER(RegisterDoTxnCommand)(InitializerContext* ctx) { + if (getTestCommandsEnabled()) { + new DoTxnCmd(); + } + return Status::OK(); +} } // namespace } // namespace mongo |