Skip to content
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

CDRIVER-4806 sync tests for failCommand errorLabels reqs #1508

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Jan 5, 2024

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

POC for mongodb/specifications#1489

Updates retryable writes prose test 3 to relocate the errorLabels field when configuring a fail point.

Note: with_transaction/callback-retry.json is unrelated but was missed in CDRIVER-2975.


This is based on #1507

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.

Commented a possible cause of a test failure in: https://github.com/mongodb/specifications/pull/1489/files#r1443264016

Here is a sample command to test locally:

# Use `MONGOC_JSON_SUBTEST` to select only one test case.
export MONGOC_JSON_SUBTEST="InsertOne succeeds after NotWritablePrimary"
# Use MONGOC_TEST_MONITORING_VERBOSE to log commands and replies
export MONGOC_TEST_MONITORING_VERBOSE=ON
./cmake-build/src/libmongoc/test-libmongoc -d --no-fork --match "/retryable_writes/legacy/insertOne-errorLabels"
# Gets error: `_id: expected 1, got 3`

@jmikola jmikola force-pushed the cdriver-4806 branch 3 times, most recently from 2b779e8 to 62987c2 Compare January 9, 2024 18:54
@jmikola jmikola requested a review from kevinAlbs January 9, 2024 20:50
@jmikola
Copy link
Member Author

jmikola commented Jan 9, 2024

@kevinAlbs: This is ready for another look. I added a skip for the unrelated, failing test and opened CDRIVER-4811 to track that.

If this looks good, you can also sign off on mongodb/specifications#1489.

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.

LGTM with one additional change:

Update the implementation of Retryable Writes Prose Test 3 to account for the moved errorLabels field.

@jmikola jmikola force-pushed the cdriver-4806 branch 2 times, most recently from f70fb33 to d27c49f Compare January 10, 2024 18:43
@jmikola
Copy link
Member Author

jmikola commented Jan 10, 2024

Update the implementation of Retryable Writes Prose Test 3 to account for the moved errorLabels field.

Thanks for catching that. Just amended the commit and PR description. Will merge after CI completes.

Synced with mongodb/specifications@5fc23f4

Updates retryable writes prose test 3 to relocate the errorLabels field when configuring a fail point.

Note: with_transaction/callback-retry.json is unrelated but was missed in CDRIVER-2975. This test currently fails and has been skipped (see: CDRIVER-4811).
@jmikola jmikola merged commit 4ef84ec into mongodb:master Jan 10, 2024
29 of 31 checks passed
@jmikola jmikola deleted the cdriver-4806 branch January 10, 2024 22:00
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