mongodb / specifications

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

DRIVERS-1709: Convert withTransaction tests to unified format #1505

Closed jmikola closed 8 months ago

jmikola commented 8 months ago

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

Note: this is being split off from https://github.com/mongodb/specifications/pull/1502

Please complete the following before merging:

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

jmikola commented 8 months ago

@jyemin: Just tagged you in case you'd like to add these to a Java patch build. Feel free to disregard and remove yourself.

Note: there was no use of targetedFailPoint in the withTransaction tests, so no further modifications were made to skip load-balanced topologies.

jyemin commented 8 months ago

Java driver is also failing the two callback-retry tests:

  1. callback is not retried after non-transient error (DuplicateKeyError)
  2. callback succeeds after multiple connection errors

So maybe not a bug in the Node driver, @durran.

There are four other tests failing as well, but those seem to be test runner issues.

Patch build: https://spruce.mongodb.com/version/65cb8c513e8e86ed75242d71/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

jmikola commented 8 months ago

@jyemin: While diagnosing some PHPLIB build failures, I realized that several tests probably had to be skipped on serverless. The legacy withTransaction tests never included load-balanced so they were always excluded on serverless.

durran commented 8 months ago

I combined both sets of changes into 1 on the Node side, and the only failures we have are related to DRIVERS-2816. See patch: https://spruce.mongodb.com/version/65cc95eba4cf475fb829553a/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC and PR: https://github.com/mongodb/node-mongodb-native/pull/3987

The other failures coming from these changes I verified and ticketed as Node issues and then skipped:

So at least from a Node perspective I think this looks good.

jmikola commented 8 months ago

Unfortunately, there are now new test failures on sharded deployments from 3.6 through 4.2. The failing tests are not the new tests and not even all of them are unified tests. I am not sure what is causing those failures, but you can see them here: https://github.com/mongodb/mongo-java-driver/pull/1310.

@jyemin: Just followed up in: https://github.com/mongodb/mongo-java-driver/pull/1310#issuecomment-1946216488

For the failures outside of the transactions and withTransaction spec tests, it may be helpful to schedule more limited builds without these suites to see if there's something with these tests leaving the cluster in a state where other spec suites are failing down the line.