Skip to content

CDRIVER-4717 sync legacy transaction tests for LB runOnRequirements #1507

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

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Jan 5, 2024

https://jira.mongodb.org/browse/CDRIVER-4717

Synced with mongodb/specifications@38e65fc

This includes error-labels-blockConnection.json for client-side operations timeout, which is not yet implemented in libmongoc.

Additional tests have been skipped since libmongoc does not pin connections on load-balanced topologies.

Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

To include these tests in CI, add: test_args+=("-l" "/transactions/legacy/*") to run-tests.sh here.

run-tests.sh runs the subset of tests noted in https://github.com/mongodb/specifications/tree/eef59d9d386bb054e0eb59e6bd540a030186f899/source/load-balancers/tests#tests

@jmikola
Copy link
Member Author

jmikola commented Jan 5, 2024

@kevinAlbs: Thanks. I'd have had no idea that was required.

Why do some other directories just run <spec_name>/*, like retryable-writes/*, despite having "legacy" and "unified" sub-directories? It leads me to wonder why we should add test_args+=("-l" "/transactions/legacy/*") instead of changing test_args+=("-l" "/transactions/unified/*") to test_args+=("-l" "/transactions/*").

@kevinAlbs
Copy link
Collaborator

Why do some other directories just run <spec_name>/*, like retryable-writes/*, despite having "legacy" and "unified" sub-directories? It leads me to wonder why we should add test_args+=("-l" "/transactions/legacy/*") instead of changing test_args+=("-l" "/transactions/unified/*") to test_args+=("-l" "/transactions/*").

I expect the reasoning was to match the requirements in the Load Balancer Support test README:

Drivers MUST run the following test suites against a load balanced cluster:

  1. All test suites written in the Unified Test Format
  2. Retryable Reads
  3. Retryable Writes
  4. Change Streams
  5. Initial DNS Seedlist Discovery

I expect retryable-writes/* was intended for 3 (all retryable writes tests) and /transactions/unified/* was intended for 1.

If all transactions tests are expected to be run against load balancers, I suggest updating the Load Balancer Support test README to add a bullet for "All transactions tests".

I see other unified tests not running against load balancers: index-management, client_side_encryption/unified. Filed CDRIVER-4810 to add them.

@jmikola
Copy link
Member Author

jmikola commented Jan 8, 2024

If all transactions tests are expected to be run against load balancers, I suggest updating the Load Balancer Support test README to add a bullet for "All transactions tests".

Legacy tests for transactions are not the only inconsistency. I just reported DRIVERS-2806 so we have a record of this but I don't intend to take any action on that as the priority should be on porting all of these legacy tests to the unified format.

Synced with mongodb/specifications@38e65fc

This includes error-labels-blockConnection.json for client-side operations timeout, which is not yet implemented in libmongoc.

Per run-tests.sh, these tests will not actually be executed on load balancers. This is intentional to avoid making further changes to the legacy spec test runner to support LBs.
@jmikola
Copy link
Member Author

jmikola commented Jan 8, 2024

@kevinAlbs: I'm giving up on the rabbit hole chase to get libmongoc's legacy test runner working with LBs. Additionally, the skips I had previously added would have resulted in skipping the tests on all environments (in contast to what we previously did in PHPLIB to only skip tests on LBs).

None of this should be worth the effort given that the transactions tests should be ported to the unified format within the coming quarter (DRIVERS-1709).

@jmikola jmikola changed the title CDRIVER-4717 run legacy transaction tests on LB topologies CDRIVER-4717 sync legacy transaction tests for LB runOnRequirements Jan 9, 2024
@jmikola jmikola merged commit 50abb26 into mongodb:master Jan 9, 2024
@jmikola jmikola deleted the cdriver-4717 branch January 9, 2024 18:17
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