diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source_sort_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_sort_test.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/document_source_sort_test.cpp b/src/mongo/db/pipeline/document_source_sort_test.cpp index 4d0fb324e60..91e54dc7aaf 100644 --- a/src/mongo/db/pipeline/document_source_sort_test.cpp +++ b/src/mongo/db/pipeline/document_source_sort_test.cpp @@ -132,9 +132,8 @@ TEST_F(DocumentSourceSortTest, SortWithLimit) { sort()->serializeToArray(arr); ASSERT_BSONOBJ_EQ(arr[0].getDocument().toBson(), BSON("$sort" << BSON("a" << 1))); - ASSERT(sort()->mergingLogic()); - ASSERT(sort()->mergingLogic()->shardsStage != nullptr); - ASSERT(sort()->mergingLogic()->mergingStage == nullptr); + ASSERT(sort()->getShardSource() != nullptr); + ASSERT(sort()->mergingLogic().mergingStage == nullptr); } container.push_back(DocumentSourceLimit::create(expCtx, 10)); @@ -160,10 +159,9 @@ TEST_F(DocumentSourceSortTest, SortWithLimit) { Value(arr), DOC_ARRAY(DOC("$sort" << DOC("a" << 1)) << DOC("$limit" << sort()->getLimit()))); - ASSERT(sort()->mergingLogic()); - ASSERT(sort()->mergingLogic()->shardsStage != nullptr); - ASSERT(sort()->mergingLogic()->mergingStage != nullptr); - ASSERT(dynamic_cast<DocumentSourceLimit*>(sort()->mergingLogic()->mergingStage.get())); + ASSERT(sort()->getShardSource() != nullptr); + ASSERT(sort()->mergingLogic().mergingStage != nullptr); + ASSERT(dynamic_cast<DocumentSourceLimit*>(sort()->mergingLogic().mergingStage.get())); } TEST_F(DocumentSourceSortTest, Dependencies) { |