diff options
author | Bernard Gorman <bernard.gorman@gmail.com> | 2018-04-03 16:55:52 +0100 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@gmail.com> | 2018-04-06 02:47:55 +0100 |
commit | 41084e8f0fa354a9efc28a354321200e94a2fcf6 (patch) | |
tree | 309fed55bfb25682117ca7a4c170c1699cadfbd6 /jstests/change_streams/lookup_post_image.js | |
parent | 87be281e31034f80723d5299b70e7e956a48c494 (diff) | |
download | mongo-41084e8f0fa354a9efc28a354321200e94a2fcf6.tar.gz |
SERVER-34090 Allow resuming change stream when resume token's document key does not contain the shard key
Diffstat (limited to 'jstests/change_streams/lookup_post_image.js')
-rw-r--r-- | jstests/change_streams/lookup_post_image.js | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/jstests/change_streams/lookup_post_image.js b/jstests/change_streams/lookup_post_image.js index 8ca05314e42..7d21884864b 100644 --- a/jstests/change_streams/lookup_post_image.js +++ b/jstests/change_streams/lookup_post_image.js @@ -19,8 +19,8 @@ jsTestLog("Testing change streams without 'fullDocument' specified"); // Test that not specifying 'fullDocument' does include a 'fullDocument' in the result for // an insert. - let cursor = cst.startWatchingChanges( - {pipeline: [{$changeStream: {}}], collection: collToWatch, includeToken: true}); + let cursor = + cst.startWatchingChanges({pipeline: [{$changeStream: {}}], collection: collToWatch}); assert.writeOK(coll.insert({_id: "fullDocument not specified"})); let latestChange = cst.getOneChange(cursor); assert.eq(latestChange.operationType, "insert"); @@ -45,11 +45,8 @@ // Test that specifying 'fullDocument' as 'default' does include a 'fullDocument' in the // result for an insert. - cursor = cst.startWatchingChanges({ - collection: collToWatch, - pipeline: [{$changeStream: {fullDocument: "default"}}], - includeToken: true - }); + cursor = cst.startWatchingChanges( + {collection: collToWatch, pipeline: [{$changeStream: {fullDocument: "default"}}]}); assert.writeOK(coll.insert({_id: "fullDocument is default"})); latestChange = cst.getOneChange(cursor); assert.eq(latestChange.operationType, "insert"); @@ -74,11 +71,8 @@ // Test that specifying 'fullDocument' as 'updateLookup' does include a 'fullDocument' in // the result for an insert. - cursor = cst.startWatchingChanges({ - collection: collToWatch, - pipeline: [{$changeStream: {fullDocument: "updateLookup"}}], - includeToken: true - }); + cursor = cst.startWatchingChanges( + {collection: collToWatch, pipeline: [{$changeStream: {fullDocument: "updateLookup"}}]}); assert.writeOK(coll.insert({_id: "fullDocument is lookup"})); latestChange = cst.getOneChange(cursor); assert.eq(latestChange.operationType, "insert"); @@ -107,8 +101,7 @@ pipeline: [ {$changeStream: {fullDocument: "updateLookup"}}, {$match: {operationType: "update"}} - ], - includeToken: true + ] }); assert.writeOK(coll.update({_id: "fullDocument is lookup"}, {$set: {updatedAgain: true}})); assert.writeOK(coll.remove({_id: "fullDocument is lookup"})); |