Skip to content

test(NODE-7561): Skip QE "prefixPreview" and "suffixPreview" tests on server 9.0.0+#4934

Open
PavelSafronov wants to merge 8 commits intomainfrom
node-7561-skip-tests
Open

test(NODE-7561): Skip QE "prefixPreview" and "suffixPreview" tests on server 9.0.0+#4934
PavelSafronov wants to merge 8 commits intomainfrom
node-7561-skip-tests

Conversation

@PavelSafronov
Copy link
Copy Markdown
Contributor

Description

Summary of Changes

Notes for Reviewers

What is the motivation for this change?

Release Highlight

Release notes highlight

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@PavelSafronov PavelSafronov marked this pull request as ready for review May 2, 2026 01:46
@PavelSafronov PavelSafronov requested a review from a team as a code owner May 2, 2026 01:46
Copilot AI review requested due to automatic review settings May 2, 2026 01:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CSFLE Queryable Encryption (QE) test coverage to avoid running deprecated prefixPreview / suffixPreview scenarios against MongoDB server versions where they’re no longer supported (9.0.0+), keeping CI green while the server/spec behavior diverges.

Changes:

  • Add maxServerVersion: 8.99.99 run-on requirements to QE unified spec tests that rely on prefixPreview / suffixPreview.
  • Fix mislabeled substringPreview test description in unified spec files.
  • Gate/skip integration test logic and spec-suite execution paths that would fail on MongoDB 9.0.0+.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/spec/client-side-encryption/tests/unified/QE-Text-suffixPreview.yml Restricts suffixPreview unified test to MongoDB < 9.0.0
test/spec/client-side-encryption/tests/unified/QE-Text-suffixPreview.json Same restriction in JSON form
test/spec/client-side-encryption/tests/unified/QE-Text-prefixPreview.yml Restricts prefixPreview unified test to MongoDB < 9.0.0
test/spec/client-side-encryption/tests/unified/QE-Text-prefixPreview.json Same restriction in JSON form
test/spec/client-side-encryption/tests/unified/QE-Text-compactStructuredEncryptionData.yml Restricts structured encryption test dependent on removed preview query types
test/spec/client-side-encryption/tests/unified/QE-Text-compactStructuredEncryptionData.json Same restriction in JSON form
test/spec/client-side-encryption/tests/unified/QE-Text-cleanupStructuredEncryptionData.yml Restricts cleanup structured encryption test dependent on removed preview query types
test/spec/client-side-encryption/tests/unified/QE-Text-cleanupStructuredEncryptionData.json Same restriction in JSON form
test/spec/client-side-encryption/tests/unified/QE-Text-substringPreview.yml Corrects test description label to substringPreview
test/spec/client-side-encryption/tests/unified/QE-Text-substringPreview.json Same description correction in JSON form
test/integration/client-side-encryption/client_side_encryption.prose.27.text_queries.test.ts Skips prefix/suffix setup and cases on MongoDB 9.0.0+
test/integration/change-streams/change_streams.spec.test.ts Attempts to version-gate unified spec suite for MongoDB 9.0.0+

Comment on lines +8 to +10
it('should run, unless it should not', { requires: { mongodb: '<9.0' } }, function () {
runUnifiedSuite(loadSpecTests(path.join('change-streams', 'unified')));
});
Comment on lines +45 to +46
const isServer9OrAbove = this.configuration.version >= '9.0.0';
const shouldRunPrefixSuffixTests = !isServer9OrAbove;
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