PHPLIB-532: Fix result expectation assertions for retryable writes

parent c1dc92cc
......@@ -185,9 +185,6 @@ final class Context
$clientOptions = isset($test->clientOptions) ? (array) $test->clientOptions : [];
// TODO: Remove this once retryWrites=true by default (see: PHPC-1324)
$clientOptions['retryWrites'] = true;
if (isset($test->outcome->collection->name)) {
$o->outcomeCollectionName = $test->outcome->collection->name;
}
......
......@@ -126,7 +126,7 @@ final class ResultExpectation
public static function fromRetryableWrites(stdClass $outcome, $defaultAssertionType)
{
if (property_exists($outcome, 'result')) {
if (property_exists($outcome, 'result') && ! self::isErrorResult($outcome->result)) {
$assertionType = $outcome->result === null ? self::ASSERT_NULL : $defaultAssertionType;
$expectedValue = $outcome->result;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment