diff options
author | Alya Berciu <alyacarina@gmail.com> | 2021-05-17 18:19:15 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-24 09:10:39 +0000 |
commit | 1059d33fa4a0d5c747a1115f0853b5f70e46f112 (patch) | |
tree | 8df47fa9cab779c578f9f52057ccccb6c1d46f15 /src/mongo/rpc | |
parent | 3f14978f40cfe899b632c43f498117080db42c77 (diff) | |
download | mongo-1059d33fa4a0d5c747a1115f0853b5f70e46f112.tar.gz |
SERVER-55015 Replace GetMoreRequest with IDL-generated GetMoreCommand
Diffstat (limited to 'src/mongo/rpc')
-rw-r--r-- | src/mongo/rpc/op_msg_integration_test.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mongo/rpc/op_msg_integration_test.cpp b/src/mongo/rpc/op_msg_integration_test.cpp index 75bd7fa4e65..d2371da22ad 100644 --- a/src/mongo/rpc/op_msg_integration_test.cpp +++ b/src/mongo/rpc/op_msg_integration_test.cpp @@ -37,7 +37,7 @@ #include "mongo/client/dbclient_rs.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/query/cursor_response.h" -#include "mongo/db/query/getmore_request.h" +#include "mongo/db/query/getmore_command_gen.h" #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/op_msg.h" @@ -356,8 +356,9 @@ void exhaustGetMoreTest(bool enableChecksum) { // Construct getMore request with exhaust flag. Set batch size so we will need multiple batches // to exhaust the cursor. int batchSize = 2; - GetMoreRequest gmr(nss, cursorId, batchSize, boost::none, boost::none, boost::none); - opMsgRequest = OpMsgRequest::fromDBAndBody(nss.db(), gmr.toBSON()); + GetMoreCommandRequest getMoreRequest(cursorId, nss.coll().toString()); + getMoreRequest.setBatchSize(batchSize); + opMsgRequest = OpMsgRequest::fromDBAndBody(nss.db(), getMoreRequest.toBSON({})); request = opMsgRequest.serialize(); OpMsg::setFlag(&request, OpMsg::kExhaustSupported); @@ -473,8 +474,9 @@ TEST(OpMsg, ServerDoesNotSetMoreToComeOnErrorInGetMore) { // Construct getMore request with exhaust flag. int batchSize = 2; - GetMoreRequest gmr(nss, cursorId, batchSize, boost::none, boost::none, boost::none); - opMsgRequest = OpMsgRequest::fromDBAndBody(nss.db(), gmr.toBSON()); + GetMoreCommandRequest getMoreRequest(cursorId, nss.coll().toString()); + getMoreRequest.setBatchSize(batchSize); + opMsgRequest = OpMsgRequest::fromDBAndBody(nss.db(), getMoreRequest.toBSON({})); request = opMsgRequest.serialize(); OpMsg::setFlag(&request, OpMsg::kExhaustSupported); @@ -517,8 +519,9 @@ TEST(OpMsg, MongosIgnoresExhaustForGetMore) { // Construct getMore request with exhaust flag. int batchSize = 2; - GetMoreRequest gmr(nss, cursorId, batchSize, boost::none, boost::none, boost::none); - opMsgRequest = OpMsgRequest::fromDBAndBody(nss.db(), gmr.toBSON()); + GetMoreCommandRequest getMoreRequest(cursorId, nss.coll().toString()); + getMoreRequest.setBatchSize(batchSize); + opMsgRequest = OpMsgRequest::fromDBAndBody(nss.db(), getMoreRequest.toBSON({})); request = opMsgRequest.serialize(); OpMsg::setFlag(&request, OpMsg::kExhaustSupported); |