diff options
author | Andrii Dobroshynski <andrii.dobroshynski@mongodb.com> | 2022-04-25 17:19:00 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-10 20:52:58 +0000 |
commit | 5a611b4f0dd3c2117b0f7dd7a7ccf9469dae796b (patch) | |
tree | 0cb9ca491100ecdca6e1784a2323016f2345387f /jstests/change_streams | |
parent | 3333ea4243ae70c176e6c5a427ce7c094b035e68 (diff) | |
download | mongo-5a611b4f0dd3c2117b0f7dd7a7ccf9469dae796b.tar.gz |
SERVER-65152 Update change_stream_null_existence_eq_rewrite_test.js for newly-added events
Diffstat (limited to 'jstests/change_streams')
-rw-r--r-- | jstests/change_streams/oplog_rewrite/change_stream_null_existence_eq_rewrite_test.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/jstests/change_streams/oplog_rewrite/change_stream_null_existence_eq_rewrite_test.js b/jstests/change_streams/oplog_rewrite/change_stream_null_existence_eq_rewrite_test.js index 323b94f5956..b211ad65a0c 100644 --- a/jstests/change_streams/oplog_rewrite/change_stream_null_existence_eq_rewrite_test.js +++ b/jstests/change_streams/oplog_rewrite/change_stream_null_existence_eq_rewrite_test.js @@ -12,14 +12,18 @@ "use strict"; load("jstests/libs/change_stream_rewrite_util.js"); // For rewrite helpers. +load('jstests/libs/change_stream_util.js'); // For isChangeStreamsVisibilityEnabled. const dbName = "change_stream_rewrite_null_existence_test"; const collName = "coll1"; +const testDB = db.getSiblingDB(dbName); +if (!isChangeStreamsVisibilityEnabled(testDB)) { + return; +} + // Establish a resume token at a point before anything actually happens in the test. const startPoint = db.getMongo().watch().getResumeToken(); - -const testDB = db.getSiblingDB(dbName); const numDocs = 8; // Generate a write workload for the change stream to consume. @@ -83,7 +87,8 @@ function traverseEvent(event, outputMap, prefixPath = "") { } // Obtain a list of all events that occurred during the write workload. -const allEvents = getAllChangeStreamEvents(testDB, [], {fullDocument: "updateLookup"}, startPoint); +const allEvents = getAllChangeStreamEvents( + testDB, [], {fullDocument: "updateLookup", showExpandedEvents: true}, startPoint); jsTestLog(`All events: ${tojson(allEvents)}`); @@ -160,7 +165,7 @@ function generateExprFilters(fieldPath) { const failedTestCases = []; // Confirm that the output of an optimized change stream matches an unoptimized stream. -for (let csConfig of [{fullDocument: "updateLookup"}]) { +for (let csConfig of [{fullDocument: "updateLookup", showExpandedEvents: true}]) { for (let fieldToTest in fieldsToBeTested) { const predicatesToTest = generateMatchFilters(fieldToTest).concat(generateExprFilters(fieldToTest)); |