summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/mr_test.cpp
diff options
context:
space:
mode:
authorNick Zolnierz <nicholas.zolnierz@mongodb.com>2018-03-05 09:49:29 -0500
committerNick Zolnierz <nicholas.zolnierz@mongodb.com>2018-03-05 12:23:39 -0500
commit74177edb35b6ce7594e4751051010ceade592484 (patch)
tree3dad385af5647a24291e8ab26ca3fdcf164e5dfd /src/mongo/db/commands/mr_test.cpp
parent9a364b4c60a3f249947468a918071e3bf586dabc (diff)
downloadmongo-74177edb35b6ce7594e4751051010ceade592484.tar.gz
Revert "SERVER-33065 CommandReplyBuilder and CommandInvocation"
This reverts commit ad94e51e0dd40b0d0c38215a36caf75a4be48415.
Diffstat (limited to 'src/mongo/db/commands/mr_test.cpp')
-rw-r--r--src/mongo/db/commands/mr_test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/mr_test.cpp b/src/mongo/db/commands/mr_test.cpp
index 8541e5f3f74..068699d88b3 100644
--- a/src/mongo/db/commands/mr_test.cpp
+++ b/src/mongo/db/commands/mr_test.cpp
@@ -423,11 +423,11 @@ Status MapReduceCommandTest::_runCommand(StringData mapCode, StringData reduceCo
ASSERT(command) << "Unable to look up mapReduce command";
auto request = OpMsgRequest::fromDBAndBody(inputNss.db(), _makeCmdObj(mapCode, reduceCode));
- BufBuilder bb;
- CommandReplyBuilder crb(BSONObjBuilder{bb});
- command->parse(_opCtx.get(), request)->run(_opCtx.get(), &crb);
- auto status = getStatusFromCommandResult(crb.getBodyBuilder().asTempObj());
- if (!status.isOK()) {
+ BSONObjBuilder result;
+ auto success = command->publicRun(_opCtx.get(), request, result);
+ if (!success) {
+ auto status = getStatusFromCommandResult(result.obj());
+ ASSERT_NOT_OK(status);
return status.withContext(str::stream() << "mapReduce command failed: " << request.body);
}