From 3cbe34eecd7b066273ac989338e4a04957ac5e4e Mon Sep 17 00:00:00 2001 From: Sergey Zelenov Date: Mon, 22 Jun 2026 15:10:56 +0200 Subject: [PATCH] chore(NODE-7418): skip csot change stream tests on sharded topology On sharded clusters the initial $changeStream aggregate is sent with maxTimeMS set to the remaining CSOT budget. mongos propagates this value to each shard as maxAwaitTimeMS on the oplog cursor, causing the server to block for the full budget when no events are present. This makes all createChangeStream CSOT tests time out on sharded+SSL hosts. The legacy-timeout retryability tests (socketTimeoutMS=100) also fail because SSL connection establishment on the sharded+SSL Evergreen host exceeds 100ms after a socket timeout invalidates the first connection. Skip all affected tests on sharded topology until NODE-7418 lands. --- ...lient_side_operations_timeout.spec.test.ts | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts b/test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts index c2ad1d1065c..d653cbd9dff 100644 --- a/test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts +++ b/test/integration/client-side-operations-timeout/client_side_operations_timeout.spec.test.ts @@ -52,13 +52,54 @@ describe('CSOT spec tests', function () { ) { return '4.4 replicaset fail point does not blockConnection for requested time'; } + // TODO(NODE-7418): on sharded clusters the initial $changeStream aggregate blocks server-side + // for the full maxTimeMS because mongos propagates maxTimeMS to each shard as maxAwaitTimeMS. + // The legacy-timeout retryability tests also fail because socketTimeoutMS=100 is too tight for + // SSL connection establishment on a sharded+SSL Evergreen host. + if ( + configuration.topologyType === 'Sharded' && + csotChangeStreamShardedSkips.has(test.description) + ) { + return 'TODO(NODE-7418): CSOT createChangeStream tests hang on sharded clusters, fixed by NODE-7418'; + } return false; }); }); +// Descriptions of CSOT change stream tests that fail specifically on sharded topologies. +// On sharded clusters, mongos propagates maxTimeMS to each shard as maxAwaitTimeMS on the +// initial $changeStream aggregate, causing the server to block for the full budget. +// The legacy timeout tests additionally fail because socketTimeoutMS=100 is too tight +// for SSL connection establishment overhead on sharded+SSL CI hosts. +// Tracked in NODE-7418 / DRIVERS-3018. +const csotChangeStreamShardedSkips = new Set([ + 'change stream can be iterated again if previous iteration times out', + 'timeoutMS can be configured on a MongoCollection - createChangeStream on collection', + 'timeoutMS can be configured on a MongoDatabase - createChangeStream on database', + 'timeoutMS can be configured on a MongoDatabase - createChangeStream on collection', + 'timeoutMS can be configured for an operation - createChangeStream on client', + 'timeoutMS can be configured for an operation - createChangeStream on database', + 'timeoutMS can be configured for an operation - createChangeStream on collection', + 'operation succeeds after one socket timeout - createChangeStream on client', + 'operation succeeds after one socket timeout - createChangeStream on database', + 'operation succeeds after one socket timeout - createChangeStream on collection', + 'operation is retried multiple times for non-zero timeoutMS - createChangeStream on client', + 'operation is retried multiple times for non-zero timeoutMS - createChangeStream on database', + 'operation is retried multiple times for non-zero timeoutMS - createChangeStream on collection' +]); + describe('CSOT modified spec tests', function () { const specs = loadSpecTests( join('..', 'integration', 'client-side-operations-timeout', 'unified-csot-node-specs') ); - runUnifiedSuite(specs); + runUnifiedSuite(specs, (test, configuration) => { + // TODO(NODE-7418): same root cause as csotChangeStreamShardedSkips above. + if ( + configuration.topologyType === 'Sharded' && + test.description === 'timeoutMS is refreshed for getMore if maxAwaitTimeMS is set' + ) { + return 'TODO(NODE-7418): CSOT createChangeStream tests hang on sharded clusters, fixed by NODE-7418'; + } + return false; + }); });