diff options
Diffstat (limited to 'src/mongo/db/commands/plan_cache_commands_test.cpp')
-rw-r--r-- | src/mongo/db/commands/plan_cache_commands_test.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands/plan_cache_commands_test.cpp b/src/mongo/db/commands/plan_cache_commands_test.cpp index 4ef229c36f4..3495ee127d6 100644 --- a/src/mongo/db/commands/plan_cache_commands_test.cpp +++ b/src/mongo/db/commands/plan_cache_commands_test.cpp @@ -40,7 +40,7 @@ namespace { static const NamespaceString nss{"test.collection"_sd}; -PlanCacheKey makeKey(const CanonicalQuery& cq) { +PlanCacheKey makeClassicKey(const CanonicalQuery& cq) { CollectionMock coll(nss); return plan_cache_key_factory::make<PlanCacheKey>(cq, &coll); } @@ -106,7 +106,7 @@ TEST(PlanCacheCommandsTest, CanCanonicalizeWithValidQuery) { plan_cache_commands::canonicalize(opCtx.get(), nss.ns(), fromjson("{query: {b: 3, a: 4}}")); ASSERT_OK(statusWithCQ.getStatus()); std::unique_ptr<CanonicalQuery> equivQuery = std::move(statusWithCQ.getValue()); - ASSERT_EQUALS(makeKey(*query), makeKey(*equivQuery)); + ASSERT_EQUALS(makeClassicKey(*query), makeClassicKey(*equivQuery)); } TEST(PlanCacheCommandsTest, SortQueryResultsInDifferentPlanCacheKeyFromUnsorted) { @@ -124,7 +124,7 @@ TEST(PlanCacheCommandsTest, SortQueryResultsInDifferentPlanCacheKeyFromUnsorted) opCtx.get(), nss.ns(), fromjson("{query: {a: 1, b: 1}, sort: {a: 1, b: 1}}")); ASSERT_OK(statusWithCQ.getStatus()); std::unique_ptr<CanonicalQuery> sortQuery = std::move(statusWithCQ.getValue()); - ASSERT_NOT_EQUALS(makeKey(*query), makeKey(*sortQuery)); + ASSERT_NOT_EQUALS(makeClassicKey(*query), makeClassicKey(*sortQuery)); } // Regression test for SERVER-17158. @@ -143,7 +143,7 @@ TEST(PlanCacheCommandsTest, SortsAreProperlyDelimitedInPlanCacheKey) { opCtx.get(), nss.ns(), fromjson("{query: {a: 1, b: 1}, sort: {aab: 1}}")); ASSERT_OK(statusWithCQ.getStatus()); std::unique_ptr<CanonicalQuery> sortQuery2 = std::move(statusWithCQ.getValue()); - ASSERT_NOT_EQUALS(makeKey(*sortQuery1), makeKey(*sortQuery2)); + ASSERT_NOT_EQUALS(makeClassicKey(*sortQuery1), makeClassicKey(*sortQuery2)); } TEST(PlanCacheCommandsTest, ProjectQueryResultsInDifferentPlanCacheKeyFromUnprojected) { @@ -160,7 +160,7 @@ TEST(PlanCacheCommandsTest, ProjectQueryResultsInDifferentPlanCacheKeyFromUnproj opCtx.get(), nss.ns(), fromjson("{query: {a: 1, b: 1}, projection: {_id: 0, a: 1}}")); ASSERT_OK(statusWithCQ.getStatus()); std::unique_ptr<CanonicalQuery> projectionQuery = std::move(statusWithCQ.getValue()); - ASSERT_NOT_EQUALS(makeKey(*query), makeKey(*projectionQuery)); + ASSERT_NOT_EQUALS(makeClassicKey(*query), makeClassicKey(*projectionQuery)); } } // namespace |