summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/query_stage_subplan.cpp
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2021-03-24 14:07:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-02 21:51:14 +0000
commitea51edf33aa685e8b8d4692ee42b8c0e8e9cfb98 (patch)
treea3866340e9e80201eb9c9b675200700cc30ad53d /src/mongo/dbtests/query_stage_subplan.cpp
parent0198bcfb938ccd788f90a2f5e6156871cf18330f (diff)
downloadmongo-ea51edf33aa685e8b8d4692ee42b8c0e8e9cfb98.tar.gz
SERVER-54975 Rename IDL parser classes to use CommandRequest and CommandReply suffixes
Diffstat (limited to 'src/mongo/dbtests/query_stage_subplan.cpp')
-rw-r--r--src/mongo/dbtests/query_stage_subplan.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/dbtests/query_stage_subplan.cpp b/src/mongo/dbtests/query_stage_subplan.cpp
index 1a63e655cf9..5f8807bfc4d 100644
--- a/src/mongo/dbtests/query_stage_subplan.cpp
+++ b/src/mongo/dbtests/query_stage_subplan.cpp
@@ -137,7 +137,7 @@ TEST_F(QueryStageSubplanTest, QueryStageSubplanGeo2dOr) {
"{$or: [{a: {$geoWithin: {$centerSphere: [[0,0],10]}}},"
"{a: {$geoWithin: {$centerSphere: [[1,1],10]}}}]}");
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(query);
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(findCommand));
ASSERT_OK(statusWithCQ.getStatus());
@@ -174,7 +174,7 @@ void assertSubplanFromCache(QueryStageSubplanTest* test, const dbtests::WriteCon
CollectionPtr collection = ctx.getCollection();
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(query);
auto statusWithCQ = CanonicalQuery::canonicalize(test->opCtx(), std::move(findCommand));
ASSERT_OK(statusWithCQ.getStatus());
@@ -258,7 +258,7 @@ TEST_F(QueryStageSubplanTest, QueryStageSubplanDontCacheZeroResults) {
CollectionPtr collection = ctx.getCollection();
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(query);
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(findCommand));
ASSERT_OK(statusWithCQ.getStatus());
@@ -314,7 +314,7 @@ TEST_F(QueryStageSubplanTest, QueryStageSubplanDontCacheTies) {
CollectionPtr collection = ctx.getCollection();
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(query);
auto statusWithCQ = CanonicalQuery::canonicalize(opCtx(), std::move(findCommand));
ASSERT_OK(statusWithCQ.getStatus());
@@ -486,7 +486,7 @@ TEST_F(QueryStageSubplanTest, QueryStageSubplanPlanRootedOrNE) {
insert(BSON("_id" << 3 << "a" << 3));
insert(BSON("_id" << 4));
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(fromjson("{$or: [{a: 1}, {a: {$ne:1}}]}"));
findCommand->setSort(BSON("d" << 1));
auto cq = unittest::assertGet(CanonicalQuery::canonicalize(opCtx(), std::move(findCommand)));
@@ -519,7 +519,7 @@ TEST_F(QueryStageSubplanTest, QueryStageSubplanPlanRootedOrNE) {
TEST_F(QueryStageSubplanTest, ShouldReportErrorIfExceedsTimeLimitDuringPlanning) {
dbtests::WriteContextForTests ctx(opCtx(), nss.ns());
// Build a query with a rooted $or.
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(BSON("$or" << BSON_ARRAY(BSON("p1" << 1) << BSON("p2" << 2))));
auto canonicalQuery =
uassertStatusOK(CanonicalQuery::canonicalize(opCtx(), std::move(findCommand)));
@@ -552,7 +552,7 @@ TEST_F(QueryStageSubplanTest, ShouldReportErrorIfExceedsTimeLimitDuringPlanning)
TEST_F(QueryStageSubplanTest, ShouldReportErrorIfKilledDuringPlanning) {
dbtests::WriteContextForTests ctx(opCtx(), nss.ns());
// Build a query with a rooted $or.
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(BSON("$or" << BSON_ARRAY(BSON("p1" << 1) << BSON("p2" << 2))));
auto canonicalQuery =
uassertStatusOK(CanonicalQuery::canonicalize(opCtx(), std::move(findCommand)));
@@ -589,7 +589,7 @@ TEST_F(QueryStageSubplanTest, ShouldThrowOnRestoreIfIndexDroppedBeforePlanSelect
}
// Build a query with a rooted $or.
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(BSON("$or" << BSON_ARRAY(BSON("p1" << 1) << BSON("p2" << 2))));
auto canonicalQuery =
uassertStatusOK(CanonicalQuery::canonicalize(opCtx(), std::move(findCommand)));
@@ -635,7 +635,7 @@ TEST_F(QueryStageSubplanTest, ShouldNotThrowOnRestoreIfIndexDroppedAfterPlanSele
}
// Build a query with a rooted $or.
- auto findCommand = std::make_unique<FindCommand>(nss);
+ auto findCommand = std::make_unique<FindCommandRequest>(nss);
findCommand->setFilter(BSON("$or" << BSON_ARRAY(BSON("p1" << 1) << BSON("p2" << 2))));
auto canonicalQuery =
uassertStatusOK(CanonicalQuery::canonicalize(opCtx(), std::move(findCommand)));