mongodb / specifications

Specifications related to MongoDB
http://specifications.readthedocs.io/en/latest
Other
389 stars 242 forks source link

DRIVERS-1709: Convert legacy transactions spec tests to unified test format #1502

Closed jmikola closed 8 months ago

jmikola commented 8 months ago

https://jira.mongodb.org/browse/DRIVERS-1709 https://jira.mongodb.org/browse/DRIVERS-2834

Note: withTransaction tests will be ported in a separate PR: https://github.com/mongodb/specifications/pull/1505

Please complete the following before merging:

POC: https://github.com/mongodb/mongo-php-library/pull/1226

durran commented 8 months ago

Node PR with my suggestions implemented there: https://github.com/mongodb/node-mongodb-native/pull/3987

jmikola commented 8 months ago

I did run into some errors where the errorContains message were different only in capitalisation but will open a drivers ticket for that to say we should always compare in lower case.

@durran: that's already addressed in the unified test format spec:

errorContains: Optional string. A substring of the expected error message (e.g. "errmsg" field in a server error document). The test runner MUST assert that the error message contains this string using a case-insensitive match.

I've updated the other tests you mentioned to use canonical lowercase strings for read preference modes.

jmikola commented 8 months ago

Note: following a discussion in Slack, I created DRIVERS-2834 and added a separate commit to exclude load-balanced topologies in tests using targetedFailPoint.

I just updated the PHPLIB patch build in https://github.com/mongodb/mongo-php-library/pull/1226 and @jyemin shared a passing Java build with me prior to leaving his LGTM above.

Pending another review from @durran, I'll consider this good to merge.