Skip to content

Commit 3685733

Browse files
committed
PHPLIB-1397: Update tests for skipping LB topologies for targetedFailPoint
1 parent 3d686b2 commit 3685733

File tree

8 files changed

+61
-77
lines changed

8 files changed

+61
-77
lines changed

tests/UnifiedSpecTests/UnifiedSpecTest.php

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -99,70 +99,8 @@ class UnifiedSpecTest extends FunctionalTestCase
9999
* Any tests that rely on session pinning (including targetedFailPoint) must
100100
* be skipped since libmongoc does not pin on load-balanced toplogies. */
101101
private static array $incompleteLoadBalancerTests = [
102-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on insertOne' => 'libmongoc does not pin for load-balanced topology',
103-
'transactions/mongos-pin-auto: unpin after transient error within a transaction' => 'libmongoc does not pin for load-balanced topology',
104-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on insertOne insert' => 'libmongoc does not pin for load-balanced topology',
105-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on insertMany insert' => 'libmongoc does not pin for load-balanced topology',
106-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on updateOne update' => 'libmongoc does not pin for load-balanced topology',
107-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on replaceOne update' => 'libmongoc does not pin for load-balanced topology',
108-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on updateMany update' => 'libmongoc does not pin for load-balanced topology',
109-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on deleteOne delete' => 'libmongoc does not pin for load-balanced topology',
110-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on deleteMany delete' => 'libmongoc does not pin for load-balanced topology',
111-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on findOneAndDelete findAndModify' => 'libmongoc does not pin for load-balanced topology',
112-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on findOneAndUpdate findAndModify' => 'libmongoc does not pin for load-balanced topology',
113-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on findOneAndReplace findAndModify' => 'libmongoc does not pin for load-balanced topology',
114-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on bulkWrite insert' => 'libmongoc does not pin for load-balanced topology',
115-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on bulkWrite update' => 'libmongoc does not pin for load-balanced topology',
116-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on bulkWrite delete' => 'libmongoc does not pin for load-balanced topology',
117-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on find find' => 'libmongoc does not pin for load-balanced topology',
118-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on countDocuments aggregate' => 'libmongoc does not pin for load-balanced topology',
119-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on aggregate aggregate' => 'libmongoc does not pin for load-balanced topology',
120-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on distinct distinct' => 'libmongoc does not pin for load-balanced topology',
121-
'transactions/mongos-pin-auto: remain pinned after non-transient Interrupted error on runCommand insert' => 'libmongoc does not pin for load-balanced topology',
122-
'transactions/mongos-pin-auto: unpin after transient connection error on insertOne insert' => 'libmongoc does not pin for load-balanced topology',
123-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on insertOne insert' => 'libmongoc does not pin for load-balanced topology',
124-
'transactions/mongos-pin-auto: unpin after transient connection error on insertMany insert' => 'libmongoc does not pin for load-balanced topology',
125-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on insertMany insert' => 'libmongoc does not pin for load-balanced topology',
126-
'transactions/mongos-pin-auto: unpin after transient connection error on updateOne update' => 'libmongoc does not pin for load-balanced topology',
127-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on updateOne update' => 'libmongoc does not pin for load-balanced topology',
128-
'transactions/mongos-pin-auto: unpin after transient connection error on replaceOne update' => 'libmongoc does not pin for load-balanced topology',
129-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on replaceOne update' => 'libmongoc does not pin for load-balanced topology',
130-
'transactions/mongos-pin-auto: unpin after transient connection error on updateMany update' => 'libmongoc does not pin for load-balanced topology',
131-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on updateMany update' => 'libmongoc does not pin for load-balanced topology',
132-
'transactions/mongos-pin-auto: unpin after transient connection error on deleteOne delete' => 'libmongoc does not pin for load-balanced topology',
133-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on deleteOne delete' => 'libmongoc does not pin for load-balanced topology',
134-
'transactions/mongos-pin-auto: unpin after transient connection error on deleteMany delete' => 'libmongoc does not pin for load-balanced topology',
135-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on deleteMany delete' => 'libmongoc does not pin for load-balanced topology',
136-
'transactions/mongos-pin-auto: unpin after transient connection error on findOneAndDelete findAndModify' => 'libmongoc does not pin for load-balanced topology',
137-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on findOneAndDelete findAndModify' => 'libmongoc does not pin for load-balanced topology',
138-
'transactions/mongos-pin-auto: unpin after transient connection error on findOneAndUpdate findAndModify' => 'libmongoc does not pin for load-balanced topology',
139-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on findOneAndUpdate findAndModify' => 'libmongoc does not pin for load-balanced topology',
140-
'transactions/mongos-pin-auto: unpin after transient connection error on findOneAndReplace findAndModify' => 'libmongoc does not pin for load-balanced topology',
141-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on findOneAndReplace findAndModify' => 'libmongoc does not pin for load-balanced topology',
142-
'transactions/mongos-pin-auto: unpin after transient connection error on bulkWrite insert' => 'libmongoc does not pin for load-balanced topology',
143-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on bulkWrite insert' => 'libmongoc does not pin for load-balanced topology',
144-
'transactions/mongos-pin-auto: unpin after transient connection error on bulkWrite update' => 'libmongoc does not pin for load-balanced topology',
145-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on bulkWrite update' => 'libmongoc does not pin for load-balanced topology',
146-
'transactions/mongos-pin-auto: unpin after transient connection error on bulkWrite delete' => 'libmongoc does not pin for load-balanced topology',
147-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on bulkWrite delete' => 'libmongoc does not pin for load-balanced topology',
148-
'transactions/mongos-pin-auto: unpin after transient connection error on find find' => 'libmongoc does not pin for load-balanced topology',
149-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on find find' => 'libmongoc does not pin for load-balanced topology',
150-
'transactions/mongos-pin-auto: unpin after transient connection error on countDocuments aggregate' => 'libmongoc does not pin for load-balanced topology',
151-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on countDocuments aggregate' => 'libmongoc does not pin for load-balanced topology',
152-
'transactions/mongos-pin-auto: unpin after transient connection error on aggregate aggregate' => 'libmongoc does not pin for load-balanced topology',
153-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on aggregate aggregate' => 'libmongoc does not pin for load-balanced topology',
154-
'transactions/mongos-pin-auto: unpin after transient connection error on distinct distinct' => 'libmongoc does not pin for load-balanced topology',
155-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on distinct distinct' => 'libmongoc does not pin for load-balanced topology',
156-
'transactions/mongos-pin-auto: unpin after transient connection error on runCommand insert' => 'libmongoc does not pin for load-balanced topology',
157-
'transactions/mongos-pin-auto: unpin after transient ShutdownInProgress error on runCommand insert' => 'libmongoc does not pin for load-balanced topology',
158102
'transactions/mongos-recovery-token: commitTransaction explicit retries include recoveryToken' => 'libmongoc omits recoveryToken for load-balanced topology (CDRIVER-4718)',
159-
'transactions/mongos-recovery-token: commitTransaction retry fails on new mongos' => 'libmongoc does not pin for load-balanced topology',
160-
'transactions/mongos-recovery-token: abortTransaction sends recoveryToken' => 'libmongoc does not pin for load-balanced topology',
161-
'transactions/mongos-recovery-token-errorLabels: commitTransaction retry succeeds on new mongos' => 'libmongoc does not pin for load-balanced topology',
162103
'transactions/pin-mongos: multiple commits' => 'libmongoc does not pin for load-balanced topology',
163-
'transactions/pin-mongos: remain pinned after non-transient error on commit' => 'libmongoc does not pin for load-balanced topology',
164-
'transactions/pin-mongos: unpin after transient error within a transaction' => 'libmongoc does not pin for load-balanced topology',
165-
'transactions/pin-mongos: unpin after transient error within a transaction and commit' => 'libmongoc does not pin for load-balanced topology',
166104
];
167105

168106
private static UnifiedTestRunner $runner;

tests/UnifiedSpecTests/transactions/mongos-pin-auto.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
{
66
"minServerVersion": "4.1.8",
77
"topologies": [
8-
"sharded",
9-
"load-balanced"
8+
"sharded"
109
],
1110
"serverless": "forbid"
1211
}

tests/UnifiedSpecTests/transactions/mongos-recovery-token-errorLabels.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"minServerVersion": "4.3.1",
77
"serverless": "forbid",
88
"topologies": [
9-
"sharded",
10-
"load-balanced"
9+
"sharded"
1110
]
1211
}
1312
],

tests/UnifiedSpecTests/transactions/mongos-recovery-token.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@
214214
},
215215
{
216216
"description": "commitTransaction retry fails on new mongos",
217+
"runOnRequirements": [
218+
{
219+
"topologies": [
220+
"sharded"
221+
]
222+
}
223+
],
217224
"operations": [
218225
{
219226
"object": "testRunner",
@@ -408,6 +415,13 @@
408415
},
409416
{
410417
"description": "abortTransaction sends recoveryToken",
418+
"runOnRequirements": [
419+
{
420+
"topologies": [
421+
"sharded"
422+
]
423+
}
424+
],
411425
"operations": [
412426
{
413427
"object": "session0",

tests/UnifiedSpecTests/transactions/mongos-unpin.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@
5252
"description": "unpin after TransientTransactionError error on commit",
5353
"runOnRequirements": [
5454
{
55-
"serverless": "forbid"
55+
"serverless": "forbid",
56+
"topologies": [
57+
"sharded"
58+
]
5659
}
5760
],
5861
"operations": [
@@ -163,7 +166,10 @@
163166
"description": "unpin after non-transient error on abort",
164167
"runOnRequirements": [
165168
{
166-
"serverless": "forbid"
169+
"serverless": "forbid",
170+
"topologies": [
171+
"sharded"
172+
]
167173
}
168174
],
169175
"operations": [
@@ -233,6 +239,13 @@
233239
},
234240
{
235241
"description": "unpin after TransientTransactionError error on abort",
242+
"runOnRequirements": [
243+
{
244+
"topologies": [
245+
"sharded"
246+
]
247+
}
248+
],
236249
"operations": [
237250
{
238251
"name": "startTransaction",

tests/UnifiedSpecTests/transactions/pin-mongos.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,13 @@
936936
},
937937
{
938938
"description": "remain pinned after non-transient error on commit",
939+
"runOnRequirements": [
940+
{
941+
"topologies": [
942+
"sharded"
943+
]
944+
}
945+
],
939946
"operations": [
940947
{
941948
"object": "session0",
@@ -1044,6 +1051,13 @@
10441051
},
10451052
{
10461053
"description": "unpin after transient error within a transaction",
1054+
"runOnRequirements": [
1055+
{
1056+
"topologies": [
1057+
"sharded"
1058+
]
1059+
}
1060+
],
10471061
"operations": [
10481062
{
10491063
"object": "session0",
@@ -1217,6 +1231,13 @@
12171231
},
12181232
{
12191233
"description": "unpin after transient error within a transaction and commit",
1234+
"runOnRequirements": [
1235+
{
1236+
"topologies": [
1237+
"sharded"
1238+
]
1239+
}
1240+
],
12201241
"operations": [
12211242
{
12221243
"object": "testRunner",

tests/UnifiedSpecTests/transactions/read-pref.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
"name": "startTransaction",
218218
"arguments": {
219219
"readPreference": {
220-
"mode": "Primary"
220+
"mode": "primary"
221221
}
222222
}
223223
},
@@ -362,7 +362,7 @@
362362
"name": "startTransaction",
363363
"arguments": {
364364
"readPreference": {
365-
"mode": "Secondary"
365+
"mode": "secondary"
366366
}
367367
}
368368
},
@@ -470,7 +470,7 @@
470470
"name": "startTransaction",
471471
"arguments": {
472472
"readPreference": {
473-
"mode": "PrimaryPreferred"
473+
"mode": "primaryPreferred"
474474
}
475475
}
476476
},
@@ -578,7 +578,7 @@
578578
"name": "startTransaction",
579579
"arguments": {
580580
"readPreference": {
581-
"mode": "Nearest"
581+
"mode": "nearest"
582582
}
583583
}
584584
},
@@ -686,7 +686,7 @@
686686
"name": "startTransaction",
687687
"arguments": {
688688
"readPreference": {
689-
"mode": "Secondary"
689+
"mode": "secondary"
690690
}
691691
}
692692
},

tests/UnifiedSpecTests/transactions/run-command.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"name": "startTransaction",
186186
"arguments": {
187187
"readPreference": {
188-
"mode": "Primary"
188+
"mode": "primary"
189189
}
190190
}
191191
},
@@ -292,7 +292,7 @@
292292
]
293293
},
294294
"readPreference": {
295-
"mode": "Primary"
295+
"mode": "primary"
296296
},
297297
"commandName": "insert"
298298
},
@@ -379,7 +379,7 @@
379379
"find": "test"
380380
},
381381
"readPreference": {
382-
"mode": "Secondary"
382+
"mode": "secondary"
383383
},
384384
"commandName": "find"
385385
},
@@ -397,7 +397,7 @@
397397
"name": "startTransaction",
398398
"arguments": {
399399
"readPreference": {
400-
"mode": "Secondary"
400+
"mode": "secondary"
401401
}
402402
}
403403
},

0 commit comments

Comments
 (0)