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; + }); });