0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-24 00:17:37 +01:00

SERVER-83104 Remove the multi-version compatibility patch for capped and numInitialChunks in change stream shard events tests (#29397)

GitOrigin-RevId: b01faad140a04e7c8d51ff81412aa36ee1c9102c
This commit is contained in:
Joan Bruguera Micó (at MongoDB) 2024-11-20 20:14:36 +00:00 committed by MongoDB Bot
parent 37e320f495
commit 7bde5a2106
2 changed files with 2 additions and 25 deletions

View File

@ -44,19 +44,6 @@ function getCollectionUuid(coll) {
return collInfo.info.uuid;
}
function assertChangeStreamEventEqMultiversionCompatible(actualEvent, expectedEvent) {
// SERVER-83104: Remove 'numInitialChunks' check once 8.0 becomes last LTS.
if ('numInitialChunks' in actualEvent.operationDescription) {
delete actualEvent.operationDescription.numInitialChunks;
}
// SERVER-83104: Remove 'capped' check once 8.0 becomes last LTS.
if (!('capped' in actualEvent.operationDescription)) {
delete expectedEvent.operationDescription.capped;
}
return assertChangeStreamEventEq(actualEvent, expectedEvent);
}
function assertNextChangeEvent(cursor, expectedEvent) {
let events = test.getNextChanges(cursor, 1);
while (events.length > 0) {
@ -75,7 +62,7 @@ function assertNextChangeEvent(cursor, expectedEvent) {
assert(event.wallTime instanceof Date);
delete event.wallTime;
expectedEvent.collectionUUID = getCollectionUuid(collName);
assertChangeStreamEventEqMultiversionCompatible(event, expectedEvent);
assertChangeStreamEventEq(event, expectedEvent);
}
function runTest(startChangeStream) {
@ -107,7 +94,7 @@ function runTest(startChangeStream) {
}
const shardEvent = events[0];
assertChangeStreamEventEqMultiversionCompatible(shardEvent, expectedOutput);
assertChangeStreamEventEq(shardEvent, expectedOutput);
// Insert a document before starting the next change stream so that we can validate the
// resuming behavior.

View File

@ -46,16 +46,6 @@ function verifyOpEntriesOnNodes(expectedOpEntryTemplates, nodes) {
assert.eq(expectedOpEntryTemplates.length, foundOpEntries.length);
for (let i = 0; i < foundOpEntries.length; ++i) {
// SERVER-83104: Remove 'numInitialChunks' check once 8.0 becomes last LTS.
if ('numInitialChunks' in foundOpEntries[i].o2) {
delete foundOpEntries[i].o2.numInitialChunks;
}
// SERVER-83104: Remove 'capped' check once 8.0 becomes last LTS.
if (!('capped' in foundOpEntries[i].o2)) {
delete expectedOpEntryTemplates[i].o2.capped;
}
assert.eq(expectedOpEntryTemplates[i].op, foundOpEntries[i].op);
assert.eq(expectedOpEntryTemplates[i].ns, foundOpEntries[i].ns);
assert.docEq(expectedOpEntryTemplates[i].o, foundOpEntries[i].o);