From 3da71d055a00afc3c80b08d047d397f085b48bab Mon Sep 17 00:00:00 2001 From: Sergey Zelenov Date: Wed, 1 Jul 2026 10:54:58 +0200 Subject: [PATCH] test: fix flaky CSOT ITERATION cursor timeout tests --- .../client-side-operations-timeout/node_csot.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/integration/client-side-operations-timeout/node_csot.test.ts b/test/integration/client-side-operations-timeout/node_csot.test.ts index 7ffae72264..c414a6755d 100644 --- a/test/integration/client-side-operations-timeout/node_csot.test.ts +++ b/test/integration/client-side-operations-timeout/node_csot.test.ts @@ -447,10 +447,10 @@ describe('CSOT driver tests', metadata, () => { const cursor = client .db('db') .collection('coll') - .find({}, { batchSize: 1, timeoutMode: 'iteration', timeoutMS: 200 }) + .find({}, { batchSize: 1, timeoutMode: 'iteration', timeoutMS: 500 }) .project({ _id: 0 }); - // Iterating over 3 documents in the collection, each artificially taking ~50 ms due to failpoint. If timeoutMS is not refreshed, then we'd expect to error + // Iterating over 3 documents in the collection, each artificially taking ~150 ms due to failpoint. If timeoutMS is not refreshed, then we'd expect to error for await (const doc of cursor) { expect(doc).to.deep.equal({ x: 1 }); } @@ -469,7 +469,7 @@ describe('CSOT driver tests', metadata, () => { const cursor = client .db('db') .collection('coll') - .find({}, { batchSize: 1, timeoutMode: 'iteration', timeoutMS: 200 }) + .find({}, { batchSize: 1, timeoutMode: 'iteration', timeoutMS: 500 }) .project({ _id: 0 }); await cursor.toArray(); @@ -701,7 +701,7 @@ describe('CSOT driver tests', metadata, () => { cursor = client .db('db') .collection('coll') - .find({}, { timeoutMS: 150, tailable: true, awaitData: true, batchSize: 1 }); + .find({}, { timeoutMS: 400, tailable: true, awaitData: true, batchSize: 1 }); // Iterate cursor 5 times (server would have blocked for 500ms overall, but client // should not throw await cursor.next(); @@ -787,7 +787,7 @@ describe('CSOT driver tests', metadata, () => { cursor = client .db('db') .collection('coll') - .find({}, { timeoutMS: 150, tailable: true, batchSize: 1 }); + .find({}, { timeoutMS: 400, tailable: true, batchSize: 1 }); for (let i = 0; i < 5; i++) { // Iterate cursor 5 times (server would have blocked for 500ms overall, but client // should not throw