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
5 changes: 3 additions & 2 deletions test/integration/crud/client_bulk_write.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,13 @@ describe('Client Bulk Write', function () {
}
}),
async function () {
const timeoutMS = 1500;
const models = await makeMultiResponseBatchModelArray(this.configuration);
const start = now();
const timeoutError = await client
.bulkWrite(models, {
verboseResults: true,
timeoutMS: 1500
timeoutMS
})
.catch(e => e);

Expand All @@ -304,7 +305,7 @@ describe('Client Bulk Write', function () {
// DRIVERS-3005 - killCursors causes cursor cleanup to extend past timeoutMS.
// The amount of time killCursors takes is wildly variable and can take up to almost
// 600-700ms sometimes.
expect(end - start).to.be.within(1500, 1500 + 800);
expect(end - start).to.be.within(timeoutMS - 100, timeoutMS + 800);
expect(commands.map(({ commandName }) => commandName)).to.have.lengthOf(2);
}
);
Expand Down