PYTHON-5884 Explicit Encryption prose test "Case 2" fails on latest server: payload contentionFactor exceeds collection's configured contention - #3034
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The setup currently drops an unrelated database (explicit_encryption_c10) even though the test creates/uses a collection of that name in test_queryable_encryption, which can cause unintended side effects (especially under parallel test execution).
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the explicit queryable encryption prose tests to align collection encryptedFields configuration with the contention_factor=10 payloads expected by “Case 2” on newer server versions, avoiding failures where the payload contention exceeds the collection’s configured contention.
Changes:
- Add a second explicit encryption collection configured with contention=10 using
encryptedFields-c10.json. - Update the contention prose test to insert/find against the new
explicit_encryption_c10collection (sync + async).
File summaries
| File | Description |
|---|---|
| test/test_encryption.py | Creates a contention=10 QE collection and updates the contention prose test to use it (sync). |
| test/asynchronous/test_encryption.py | Same as above for the async test suite. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "create", "explicit_encryption", encryptedFields=self.encrypted_fields | ||
| ) | ||
| self.encrypted_fields_c10 = json_data("etc", "data", "encryptedFields-c10.json") | ||
| await self.client.drop_database(self.client.explicit_encryption_c10) |
| self.client.drop_database(self.db) | ||
| self.db.command("create", "explicit_encryption", encryptedFields=self.encrypted_fields) | ||
| self.encrypted_fields_c10 = json_data("etc", "data", "encryptedFields-c10.json") | ||
| self.client.drop_database(self.client.explicit_encryption_c10) |
…ver into PYTHON-5884
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PYTHON-5884
Changes in this PR
fix the prose test
Test Plan
passing evergreen patch for encryption variants: https://spruce.corp.mongodb.com/version/6a97355c960c270007693694/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC
Checklist
Checklist for Author
Checklist for Reviewer