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:
parent
37e320f495
commit
7bde5a2106
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user