Skip to content

Commit

Permalink
PHPLIB-1397: Update tests for skipping LB topologies for targetedFail…
Browse files Browse the repository at this point in the history
…Point
  • Loading branch information
jmikola committed Feb 13, 2024
1 parent aab06d6 commit 9f98eb5
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 77 deletions.
62 changes: 0 additions & 62 deletions tests/UnifiedSpecTests/UnifiedSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,70 +99,8 @@ class UnifiedSpecTest extends FunctionalTestCase
* Any tests that rely on session pinning (including targetedFailPoint) must
* be skipped since libmongoc does not pin on load-balanced toplogies. */
private static array $incompleteLoadBalancerTests = [
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on insertOne' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient error within a transaction' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on insertOne insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on insertMany insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on updateOne update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on replaceOne update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on updateMany update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on deleteOne delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on deleteMany delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on findOneAndDelete findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on findOneAndUpdate findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on findOneAndReplace findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on bulkWrite insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on bulkWrite update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on bulkWrite delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on find find' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on countDocuments aggregate' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on aggregate aggregate' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on distinct distinct' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on runCommand insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on insertOne insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on insertOne insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on insertMany insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on insertMany insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on updateOne update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on updateOne update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on replaceOne update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on replaceOne update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on updateMany update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on updateMany update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on deleteOne delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on deleteOne delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on deleteMany delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on deleteMany delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on findOneAndDelete findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on findOneAndDelete findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on findOneAndUpdate findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on findOneAndUpdate findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on findOneAndReplace findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on findOneAndReplace findAndModify' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on bulkWrite insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on bulkWrite insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on bulkWrite update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on bulkWrite update' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on bulkWrite delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on bulkWrite delete' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on find find' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on find find' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on countDocuments aggregate' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on countDocuments aggregate' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on aggregate aggregate' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on aggregate aggregate' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on distinct distinct' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on distinct distinct' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient connection error on runCommand insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on runCommand insert' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-recovery-token: commitTransaction explicit retries include recoveryToken' => 'libmongoc omits recoveryToken for load-balanced topology (CDRIVER-4718)',
'transactions/mongos-recovery-token: commitTransaction retry fails on new mongos' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-recovery-token: abortTransaction sends recoveryToken' => 'libmongoc does not pin for load-balanced topology',
'transactions/mongos-recovery-token-errorLabels: commitTransaction retry succeeds on new mongos' => 'libmongoc does not pin for load-balanced topology',
'transactions/pin-mongos: multiple commits' => 'libmongoc does not pin for load-balanced topology',
'transactions/pin-mongos: remain pinned after non-transient error on commit' => 'libmongoc does not pin for load-balanced topology',
'transactions/pin-mongos: unpin after transient error within a transaction' => 'libmongoc does not pin for load-balanced topology',
'transactions/pin-mongos: unpin after transient error within a transaction and commit' => 'libmongoc does not pin for load-balanced topology',
];

private static UnifiedTestRunner $runner;
Expand Down
3 changes: 1 addition & 2 deletions tests/UnifiedSpecTests/transactions/mongos-pin-auto.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
{
"minServerVersion": "4.1.8",
"topologies": [
"sharded",
"load-balanced"
"sharded"
],
"serverless": "forbid"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"minServerVersion": "4.3.1",
"serverless": "forbid",
"topologies": [
"sharded",
"load-balanced"
"sharded"
]
}
],
Expand Down
14 changes: 14 additions & 0 deletions tests/UnifiedSpecTests/transactions/mongos-recovery-token.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@
},
{
"description": "commitTransaction retry fails on new mongos",
"runOnRequirements": [
{
"topologies": [
"sharded"
]
}
],
"operations": [
{
"object": "testRunner",
Expand Down Expand Up @@ -408,6 +415,13 @@
},
{
"description": "abortTransaction sends recoveryToken",
"runOnRequirements": [
{
"topologies": [
"sharded"
]
}
],
"operations": [
{
"object": "session0",
Expand Down
17 changes: 15 additions & 2 deletions tests/UnifiedSpecTests/transactions/mongos-unpin.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@
"description": "unpin after TransientTransactionError error on commit",
"runOnRequirements": [
{
"serverless": "forbid"
"serverless": "forbid",
"topologies": [
"sharded"
]
}
],
"operations": [
Expand Down Expand Up @@ -163,7 +166,10 @@
"description": "unpin after non-transient error on abort",
"runOnRequirements": [
{
"serverless": "forbid"
"serverless": "forbid",
"topologies": [
"sharded"
]
}
],
"operations": [
Expand Down Expand Up @@ -233,6 +239,13 @@
},
{
"description": "unpin after TransientTransactionError error on abort",
"runOnRequirements": [
{
"topologies": [
"sharded"
]
}
],
"operations": [
{
"name": "startTransaction",
Expand Down
21 changes: 21 additions & 0 deletions tests/UnifiedSpecTests/transactions/pin-mongos.json
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,13 @@
},
{
"description": "remain pinned after non-transient error on commit",
"runOnRequirements": [
{
"topologies": [
"sharded"
]
}
],
"operations": [
{
"object": "session0",
Expand Down Expand Up @@ -1044,6 +1051,13 @@
},
{
"description": "unpin after transient error within a transaction",
"runOnRequirements": [
{
"topologies": [
"sharded"
]
}
],
"operations": [
{
"object": "session0",
Expand Down Expand Up @@ -1217,6 +1231,13 @@
},
{
"description": "unpin after transient error within a transaction and commit",
"runOnRequirements": [
{
"topologies": [
"sharded"
]
}
],
"operations": [
{
"object": "testRunner",
Expand Down
10 changes: 5 additions & 5 deletions tests/UnifiedSpecTests/transactions/read-pref.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "Primary"
"mode": "primary"
}
}
},
Expand Down Expand Up @@ -362,7 +362,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "Secondary"
"mode": "secondary"
}
}
},
Expand Down Expand Up @@ -470,7 +470,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "PrimaryPreferred"
"mode": "primaryPreferred"
}
}
},
Expand Down Expand Up @@ -578,7 +578,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "Nearest"
"mode": "nearest"
}
}
},
Expand Down Expand Up @@ -686,7 +686,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "Secondary"
"mode": "secondary"
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions tests/UnifiedSpecTests/transactions/run-command.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "Primary"
"mode": "primary"
}
}
},
Expand Down Expand Up @@ -292,7 +292,7 @@
]
},
"readPreference": {
"mode": "Primary"
"mode": "primary"
},
"commandName": "insert"
},
Expand Down Expand Up @@ -379,7 +379,7 @@
"find": "test"
},
"readPreference": {
"mode": "Secondary"
"mode": "secondary"
},
"commandName": "find"
},
Expand All @@ -397,7 +397,7 @@
"name": "startTransaction",
"arguments": {
"readPreference": {
"mode": "Secondary"
"mode": "secondary"
}
}
},
Expand Down

0 comments on commit 9f98eb5

Please sign in to comment.