Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-php-library
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
mongo-php-library
Commits
8f7d7f8e
Unverified
Commit
8f7d7f8e
authored
Mar 09, 2020
by
Andreas Braun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHPLIB-532: Fix result expectation assertions for retryable writes
parent
c1dc92cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
Context.php
tests/SpecTests/Context.php
+0
-3
ResultExpectation.php
tests/SpecTests/ResultExpectation.php
+1
-1
No files found.
tests/SpecTests/Context.php
View file @
8f7d7f8e
...
@@ -185,9 +185,6 @@ final class Context
...
@@ -185,9 +185,6 @@ final class Context
$clientOptions
=
isset
(
$test
->
clientOptions
)
?
(
array
)
$test
->
clientOptions
:
[];
$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
))
{
if
(
isset
(
$test
->
outcome
->
collection
->
name
))
{
$o
->
outcomeCollectionName
=
$test
->
outcome
->
collection
->
name
;
$o
->
outcomeCollectionName
=
$test
->
outcome
->
collection
->
name
;
}
}
...
...
tests/SpecTests/ResultExpectation.php
View file @
8f7d7f8e
...
@@ -126,7 +126,7 @@ final class ResultExpectation
...
@@ -126,7 +126,7 @@ final class ResultExpectation
public
static
function
fromRetryableWrites
(
stdClass
$outcome
,
$defaultAssertionType
)
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
;
$assertionType
=
$outcome
->
result
===
null
?
self
::
ASSERT_NULL
:
$defaultAssertionType
;
$expectedValue
=
$outcome
->
result
;
$expectedValue
=
$outcome
->
result
;
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment