diff options
author | Eddie Louie <eddie.louie@mongodb.com> | 2017-08-01 19:47:13 -0400 |
---|---|---|
committer | Eddie Louie <eddie.louie@mongodb.com> | 2017-08-01 19:47:13 -0400 |
commit | 2a76bd75d75197d3604643ff2b11d0a8f23c14f9 (patch) | |
tree | 10a26d5aec28d9d912c2020a9e4c87064382cf09 /src/mongo/db/pipeline/document_source_bucket_test.cpp | |
parent | 6fd97bdfa5f2d0d07993c538b0787ad788227ef2 (diff) | |
download | mongo-2a76bd75d75197d3604643ff2b11d0a8f23c14f9.tar.gz |
Revert "SERVER-29135 Add post-image lookup to $changeNotification"
This reverts commit ad30a49a33b8773cbc07388bb257d605cbd6aa12.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_bucket_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_bucket_test.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mongo/db/pipeline/document_source_bucket_test.cpp b/src/mongo/db/pipeline/document_source_bucket_test.cpp index 26f18c4dca9..1a61934dcb5 100644 --- a/src/mongo/db/pipeline/document_source_bucket_test.cpp +++ b/src/mongo/db/pipeline/document_source_bucket_test.cpp @@ -47,22 +47,21 @@ namespace mongo { namespace { -using boost::intrusive_ptr; -using std::list; using std::vector; +using boost::intrusive_ptr; class BucketReturnsGroupAndSort : public AggregationContextFixture { public: void testCreateFromBsonResult(BSONObj bucketSpec, Value expectedGroupExplain) { - list<intrusive_ptr<DocumentSource>> result = + vector<intrusive_ptr<DocumentSource>> result = DocumentSourceBucket::createFromBson(bucketSpec.firstElement(), getExpCtx()); ASSERT_EQUALS(result.size(), 2UL); - const auto* groupStage = dynamic_cast<DocumentSourceGroup*>(result.front().get()); + const auto* groupStage = dynamic_cast<DocumentSourceGroup*>(result[0].get()); ASSERT(groupStage); - const auto* sortStage = dynamic_cast<DocumentSourceSort*>(result.back().get()); + const auto* sortStage = dynamic_cast<DocumentSourceSort*>(result[1].get()); ASSERT(sortStage); // Serialize the DocumentSourceGroup and DocumentSourceSort from $bucket so that we can @@ -155,7 +154,7 @@ TEST_F(BucketReturnsGroupAndSort, BucketSucceedsWithMultipleBoundaryValues) { class InvalidBucketSpec : public AggregationContextFixture { public: - list<intrusive_ptr<DocumentSource>> createBucket(BSONObj bucketSpec) { + vector<intrusive_ptr<DocumentSource>> createBucket(BSONObj bucketSpec) { auto sources = DocumentSourceBucket::createFromBson(bucketSpec.firstElement(), getExpCtx()); return sources; } @@ -268,14 +267,14 @@ TEST_F(InvalidBucketSpec, GroupFailsForBucketWithInvalidOutputField) { TEST_F(InvalidBucketSpec, SwitchFailsForBucketWhenNoDefaultSpecified) { const auto spec = fromjson("{$bucket : {groupBy : '$x', boundaries : [1, 2, 3]}}"); - list<intrusive_ptr<DocumentSource>> bucketStages = createBucket(spec); + vector<intrusive_ptr<DocumentSource>> bucketStages = createBucket(spec); ASSERT_EQUALS(bucketStages.size(), 2UL); - auto* groupStage = dynamic_cast<DocumentSourceGroup*>(bucketStages.front().get()); + auto* groupStage = dynamic_cast<DocumentSourceGroup*>(bucketStages[0].get()); ASSERT(groupStage); - const auto* sortStage = dynamic_cast<DocumentSourceSort*>(bucketStages.back().get()); + const auto* sortStage = dynamic_cast<DocumentSourceSort*>(bucketStages[1].get()); ASSERT(sortStage); auto doc = Document{{"x", 4}}; |