diff options
author | Anthony Roy <anthony.roy@10gen.com> | 2018-06-19 17:53:48 -0400 |
---|---|---|
committer | Anthony Roy <anthony.roy@10gen.com> | 2018-07-05 17:43:25 -0400 |
commit | f78056a8f1f5ea6af23bd68123659b714233b370 (patch) | |
tree | ca9bf843fec69e4ba687bdee55dade490b5ac246 /src/mongo/db/commands/mr_test.cpp | |
parent | 173ac70346990e4cf9b2720f86697785b8795967 (diff) | |
download | mongo-f78056a8f1f5ea6af23bd68123659b714233b370.tar.gz |
SERVER-35460 Replaced CommandReplyBuilder with direct usage of ReplyBuilderInterface
This is to provide access to DocumentSequence returns.
Diffstat (limited to 'src/mongo/db/commands/mr_test.cpp')
-rw-r--r-- | src/mongo/db/commands/mr_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/commands/mr_test.cpp b/src/mongo/db/commands/mr_test.cpp index f8c81c473a5..6a1f5d67302 100644 --- a/src/mongo/db/commands/mr_test.cpp +++ b/src/mongo/db/commands/mr_test.cpp @@ -47,6 +47,7 @@ #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/repl/storage_interface_impl.h" #include "mongo/db/service_context_d_test_fixture.h" +#include "mongo/rpc/factory.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/scripting/dbdirectclient_factory.h" #include "mongo/scripting/engine.h" @@ -425,10 +426,9 @@ 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()); + auto replyBuilder = rpc::makeReplyBuilder(rpc::Protocol::kOpMsg); + command->parse(_opCtx.get(), request)->run(_opCtx.get(), replyBuilder.get()); + auto status = getStatusFromCommandResult(replyBuilder->getBodyBuilder().asTempObj()); if (!status.isOK()) { return status.withContext(str::stream() << "mapReduce command failed: " << request.body); } |