Skip to content

RetryableWriteError label spec tests #725

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 3 commits into from
Mar 10, 2020
Merged

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Mar 9, 2020

Fixes PHPLIB-532 and PHPLIB-534. Verifies correct behaviour of error label changes to retryable writes.

@alcaeus alcaeus self-assigned this Mar 9, 2020
@alcaeus alcaeus merged commit fe4ff68 into mongodb:master Mar 10, 2020
@alcaeus alcaeus deleted the phplib-532 branch March 10, 2020 07:55
@@ -126,7 +126,7 @@ public static function fromRetryableReads(stdClass $operation, $defaultAssertion

public static function fromRetryableWrites(stdClass $outcome, $defaultAssertionType)
{
if (property_exists($outcome, 'result')) {
if (property_exists($outcome, 'result') && ! self::isErrorResult($outcome->result)) {
Copy link
Member

@jmikola jmikola Mar 10, 2020

Choose a reason for hiding this comment

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

Was this necessary because the retryable writes tests synced in this PR were the first to include error fields under an outcome.result object? For example:

"error": true,
"result": {
  "errorLabelsContain": [
    "RetryableWriteError"
  ]
},

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, other tests didn’t include error results.

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