summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2019-02-26 14:55:59 -0500
committerJames Wahlin <james@mongodb.com>2019-03-15 09:01:46 -0400
commit0f4aa577ed1e408eed4bb2b0ed8207f911683f7c (patch)
treef64974bf59cfb743520a3b6f1bc5886a3b8e43fb /src/mongo/dbtests
parent0cfc32589d5f6436e83d6d0d290849cf3798cbae (diff)
downloadmongo-0f4aa577ed1e408eed4bb2b0ed8207f911683f7c.tar.gz
SERVER-15221 Planner sort analysis should not add FETCH stage if sort key included in index key pattern
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r--src/mongo/dbtests/query_stage_sort_key_generator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/dbtests/query_stage_sort_key_generator.cpp b/src/mongo/dbtests/query_stage_sort_key_generator.cpp
index 07f016d9b91..7d73f858953 100644
--- a/src/mongo/dbtests/query_stage_sort_key_generator.cpp
+++ b/src/mongo/dbtests/query_stage_sort_key_generator.cpp
@@ -219,7 +219,7 @@ TEST(SortKeyGeneratorStageTest, CollatorHasNoEffectWhenExtractingNonStringSortKe
ASSERT_BSONOBJ_EQ(actualOut, expectedOut);
}
-TEST(SortKeyGeneratorStageTest, CollatorHasNoAffectWhenExtractingCoveredSortKey) {
+TEST(SortKeyGeneratorStageTest, CollatorAppliesWhenExtractingCoveredSortKeyString) {
CollatorInterfaceMock collator(CollatorInterfaceMock::MockType::kReverseString);
BSONObj actualOut = extractSortKeyCovered("{b: 1}",
IndexKeyDatum(BSON("a" << 1 << "b" << 1),
@@ -228,7 +228,7 @@ TEST(SortKeyGeneratorStageTest, CollatorHasNoAffectWhenExtractingCoveredSortKey)
nullptr),
&collator);
BSONObj expectedOut = BSON(""
- << "foo");
+ << "oof");
ASSERT_BSONOBJ_EQ(actualOut, expectedOut);
}