diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-08-10 14:09:11 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-08-15 15:29:05 -0400 |
commit | 13b5a981c0118704c91881669444ae66d0261878 (patch) | |
tree | 83b597394046ba8b3f3d29136524598a7ff95a2d /src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp | |
parent | c6d8efbf92ed0f3fd20d05557cfbe77d0c7934b4 (diff) | |
download | mongo-13b5a981c0118704c91881669444ae66d0261878.tar.gz |
SERVER-30512 Omit fullDocument in change stream if it's null unless updateLookup is specified explicitly.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp b/src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp index 0e156287125..c1d0c6d10fa 100644 --- a/src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp +++ b/src/mongo/db/pipeline/document_source_lookup_change_post_image_test.cpp @@ -219,12 +219,11 @@ TEST_F(DocumentSourceLookupChangePostImageTest, ShouldPropagatePauses) { auto mockLocalSource = DocumentSourceMock::create( {Document{{"documentKey", Document{{"_id", 0}}}, {"operationType", "insert"_sd}, - {"fullDocument", Document{{"_id", 0}}}, - {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}}, + {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}, + {"fullDocument", Document{{"_id", 0}}}}, DocumentSource::GetNextResult::makePauseExecution(), Document{{"documentKey", Document{{"_id", 1}}}, {"operationType", "update"_sd}, - {"fullDocument", BSONNULL}, {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}}, DocumentSource::GetNextResult::makePauseExecution()}); @@ -242,8 +241,8 @@ TEST_F(DocumentSourceLookupChangePostImageTest, ShouldPropagatePauses) { next.releaseDocument(), (Document{{"documentKey", Document{{"_id", 0}}}, {"operationType", "insert"_sd}, - {"fullDocument", Document{{"_id", 0}}}, - {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}})); + {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}, + {"fullDocument", Document{{"_id", 0}}}})); ASSERT_TRUE(lookupChangeStage->getNext().isPaused()); @@ -253,8 +252,8 @@ TEST_F(DocumentSourceLookupChangePostImageTest, ShouldPropagatePauses) { next.releaseDocument(), (Document{{"documentKey", Document{{"_id", 1}}}, {"operationType", "update"_sd}, - {"fullDocument", Document{{"_id", 1}}}, - {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}})); + {"ns", Document{{"db", expCtx->ns.db()}, {"coll", expCtx->ns.coll()}}}, + {"fullDocument", Document{{"_id", 1}}}})); ASSERT_TRUE(lookupChangeStage->getNext().isPaused()); |