Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions test/integration/change-streams/change_stream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { setTimeout } from 'timers';

import {
type ChangeStream,
type ChangeStreamDocument,
type ChangeStreamOptions,
type Collection,
type CommandStartedEvent,
Expand Down Expand Up @@ -1955,7 +1956,9 @@ describe('ChangeStream resumability', function () {

expect(change).to.have.property('operationType', 'insert');

expect(aggregateEvents).to.have.lengthOf(6);
// More than one aggregate event indicates that the change stream attempted more than one
// resume attempt.
expect(aggregateEvents.length).to.be.greaterThan(1);
}
);
}
Expand Down Expand Up @@ -2147,7 +2150,9 @@ describe('ChangeStream resumability', function () {

expect(change).to.be.true;

expect(aggregateEvents).to.have.lengthOf(6);
// More than one aggregate event indicates that the change stream attempted more than one
// resume attempt.
expect(aggregateEvents.length).to.be.greaterThan(1);
}
);
}
Expand Down Expand Up @@ -2346,7 +2351,9 @@ describe('ChangeStream resumability', function () {
expect.fail(`expected tryNext to resume, received error instead: ${err}`);
}

expect(aggregateEvents).to.have.lengthOf(6);
// More than one aggregate event indicates that the change stream attempted more than one
// resume attempt.
expect(aggregateEvents.length).to.be.greaterThan(1);
}
);
}
Expand Down Expand Up @@ -2732,7 +2739,9 @@ describe('ChangeStream resumability', function () {
const [change] = (value as PromiseFulfilledResult<ChangeStreamDocument[]>).value;
expect(change).to.have.property('operationType', 'insert');

expect(aggregateEvents).to.have.lengthOf(6);
// More than one aggregate event indicates that the change stream attempted more than one
// resume attempt.
expect(aggregateEvents.length).to.be.greaterThan(1);
}
);
}
Expand Down