-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip PHPLIB-1228: Run legacy transaction tests on LB topologies
- Loading branch information
Showing
33 changed files
with
910 additions
and
696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
"minServerVersion": "4.3.4", | ||
"topology": [ | ||
"replicaset", | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
"minServerVersion": "4.3.4", | ||
"topology": [ | ||
"replicaset", | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
160 changes: 160 additions & 0 deletions
160
tests/SpecTests/transactions/error-labels-blockConnection.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
{ | ||
"runOn": [ | ||
{ | ||
"minServerVersion": "4.2", | ||
"topology": [ | ||
"replicaset", | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
"database_name": "transaction-tests", | ||
"collection_name": "test", | ||
"data": [], | ||
"tests": [ | ||
{ | ||
"description": "add RetryableWriteError and UnknownTransactionCommitResult labels to connection errors", | ||
"clientOptions": { | ||
"socketTimeoutMS": 100 | ||
}, | ||
"failPoint": { | ||
"configureFailPoint": "failCommand", | ||
"mode": { | ||
"times": 2 | ||
}, | ||
"data": { | ||
"failCommands": [ | ||
"commitTransaction" | ||
], | ||
"blockConnection": true, | ||
"blockTimeMS": 150 | ||
} | ||
}, | ||
"operations": [ | ||
{ | ||
"name": "startTransaction", | ||
"object": "session0" | ||
}, | ||
{ | ||
"name": "insertOne", | ||
"object": "collection", | ||
"arguments": { | ||
"session": "session0", | ||
"document": { | ||
"_id": 1 | ||
} | ||
}, | ||
"result": { | ||
"insertedId": 1 | ||
} | ||
}, | ||
{ | ||
"name": "commitTransaction", | ||
"object": "session0", | ||
"result": { | ||
"errorLabelsContain": [ | ||
"RetryableWriteError", | ||
"UnknownTransactionCommitResult" | ||
], | ||
"errorLabelsOmit": [ | ||
"TransientTransactionError" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "commitTransaction", | ||
"object": "session0" | ||
} | ||
], | ||
"expectations": [ | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"insert": "test", | ||
"documents": [ | ||
{ | ||
"_id": 1 | ||
} | ||
], | ||
"ordered": true, | ||
"readConcern": null, | ||
"lsid": "session0", | ||
"txnNumber": { | ||
"$numberLong": "1" | ||
}, | ||
"startTransaction": true, | ||
"autocommit": false, | ||
"writeConcern": null | ||
}, | ||
"command_name": "insert", | ||
"database_name": "transaction-tests" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"commitTransaction": 1, | ||
"lsid": "session0", | ||
"txnNumber": { | ||
"$numberLong": "1" | ||
}, | ||
"startTransaction": null, | ||
"autocommit": false, | ||
"writeConcern": null | ||
}, | ||
"command_name": "commitTransaction", | ||
"database_name": "admin" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"commitTransaction": 1, | ||
"lsid": "session0", | ||
"txnNumber": { | ||
"$numberLong": "1" | ||
}, | ||
"startTransaction": null, | ||
"autocommit": false, | ||
"writeConcern": { | ||
"w": "majority", | ||
"wtimeout": 10000 | ||
} | ||
}, | ||
"command_name": "commitTransaction", | ||
"database_name": "admin" | ||
} | ||
}, | ||
{ | ||
"command_started_event": { | ||
"command": { | ||
"commitTransaction": 1, | ||
"lsid": "session0", | ||
"txnNumber": { | ||
"$numberLong": "1" | ||
}, | ||
"startTransaction": null, | ||
"autocommit": false, | ||
"writeConcern": { | ||
"w": "majority", | ||
"wtimeout": 10000 | ||
} | ||
}, | ||
"command_name": "commitTransaction", | ||
"database_name": "admin" | ||
} | ||
} | ||
], | ||
"outcome": { | ||
"collection": { | ||
"data": [ | ||
{ | ||
"_id": 1 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,8 @@ | |
{ | ||
"minServerVersion": "4.1.8", | ||
"topology": [ | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
"minServerVersion": "4.3.1", | ||
"topology": [ | ||
"replicaset", | ||
"sharded" | ||
"sharded", | ||
"load-balanced" | ||
] | ||
} | ||
], | ||
|
Oops, something went wrong.