Skip to content

RUBY-3910 Skip time-sensitive CSOT change stream tests on 9.0+ sharded#3092

Open
jamis wants to merge 2 commits into
mongodb:masterfrom
jamis:3910-time-sensitive-csot-tests
Open

RUBY-3910 Skip time-sensitive CSOT change stream tests on 9.0+ sharded#3092
jamis wants to merge 2 commits into
mongodb:masterfrom
jamis:3910-time-sensitive-csot-tests

Conversation

@jamis

@jamis jamis commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Sync the CSOT spec fixtures from DRIVERS-3556 (spec PRs #1962 and #1964).

On 9.0+ sharded clusters, opening a current-time change stream can block until the config server's cluster time advances past the open time (intentional SPM-1941 behavior). This races against the sub-1s timeoutMS values these tests use, producing spurious failures in CI. The spec addressed it by splitting the affected createChangeStream tests' runOnRequirements into a replicaset entry and a sharded entry capped at maxServerVersion: "8.99", so they no longer run on 9.0+ sharded topologies.

This PR mirrors those changes into spec/spec_tests/data/client_side_operations_timeout/ — 11 test cases across 5 files:

  • override-operation-timeoutMS.yml (client, database, collection)
  • override-collection-timeoutMS.yml (collection)
  • override-database-timeoutMS.yml (database, collection)
  • retryability-legacy-timeouts.yml (client, database, collection)
  • retryability-timeoutMS.yml (client, database, collection)

The driver consumes these .yml fixtures directly, so no runner or template changes are needed.

Testing

Ran the full CSOT suite against a local 9.0.0-rc0 replica set (CSOT_SPEC_TESTS=1). The edited change-stream tests still run on the replica set (skips only apply to sharded) and pass. The one unrelated failure (deprecated-options.yml maxTimeMS/aggregate) is pre-existing and independent of these changes.

The 9.0 server can delay opening a current-time change stream (SPM-1941),
which races against sub-1s timeoutMS values and causes spurious failures on
sharded clusters. Sync the spec fixtures that split the affected
createChangeStream tests into replicaset and sharded (maxServerVersion 8.99)
requirements. From DRIVERS-3556 spec PRs mongodb#1962 and mongodb#1964.
@jamis
jamis requested a review from a team as a code owner July 23, 2026 21:01
@jamis
jamis requested review from comandeo-mongo and Copilot July 23, 2026 21:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Synchronizes Client-Side Operations Timeout (CSOT) unified spec fixtures to avoid time-sensitive createChangeStream tests running on MongoDB 9.0+ sharded clusters, where server behavior can cause spurious timeouts.

Changes:

  • Split affected createChangeStream test runOnRequirements entries into:
    • a replica set requirement (still runs on 9.0+ replica sets), and
    • a sharded requirement capped with maxServerVersion: "8.99" (skips sharded 9.0+).
  • Apply this fixture change across the CSOT timeoutMS and legacy timeout retryability/override YAMLs where current-time change streams are opened.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml Split createChangeStream retryability test requirements to skip sharded 9.0+.
spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml Add per-test requirements for createChangeStream legacy-timeout retryability tests to skip sharded 9.0+.
spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml Add per-test requirements for createChangeStream operation-level override tests to skip sharded 9.0+.
spec/spec_tests/data/client_side_operations_timeout/override-database-timeoutMS.yml Add per-test requirements for createChangeStream database-level override tests to skip sharded 9.0+.
spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml Add per-test requirements for createChangeStream collection-level override test to skip sharded 9.0+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants