-
Notifications
You must be signed in to change notification settings - Fork 84
chore: verify we only encounter expected MongoDB server warnings MONGOSH-2988 #2574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds infrastructure to verify that only expected MongoDB server warnings are encountered during testing. The implementation tracks server log warnings, allows tests to filter expected warnings, and enforces checks after each test to catch unexpected warnings.
Key changes:
- Added warning tracking and filtering infrastructure to
MongoRunnerSetupclass - Updated
mongodb-runnerdependency from^6.0.0to^6.2.0 - Added
allowWarning()calls throughout test files to filter expected deprecation and operational warnings
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| testing/integration-testing-hooks.ts | Core implementation of warning tracking, filtering, and checkpoint validation |
| packages/shell-api/src/shard.spec.ts | Added warning filters for query analyzer configuration tests |
| packages/shell-api/src/session.spec.ts | Added warning filter for deprecated logout command |
| packages/shell-api/src/replica-set.spec.ts | Added warning filters for replica set operations and query analyzer tests |
| packages/shell-api/src/integration.spec.ts | Added warning filters for multiple deprecated commands and operations |
| packages/e2e-tests/test/e2e.spec.ts | Added warning filters for deprecated commands and improved async handling |
| packages/e2e-tests/test/e2e-proxy.spec.ts | Added warning filter for TLS certificate validation in OIDC tests |
| packages/e2e-tests/test/e2e-oidc.spec.ts | Added warning filter for TLS certificate validation and checkpoint calls |
| packages/e2e-tests/test/e2e-auth.spec.ts | Added warning filter for deprecated logout command |
| packages/cli-repl/src/cli-repl.spec.ts | Added warning filters for deprecated $where operator |
| package.json | Updated mongodb-runner dependency version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.