Skip to content

Commit 40f231d

Browse files
committed
PHPLIB-755: Update retryable writes and transaction tests with error labels
Synced with mongodb/specifications@5645474
1 parent 44c4ae4 commit 40f231d

13 files changed

+84
-84
lines changed

tests/SpecTests/retryable-writes/bulkWrite-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@
119119
"failCommands": [
120120
"insert"
121121
],
122+
"errorLabels": [
123+
"RetryableWriteError"
124+
],
122125
"writeConcernError": {
123126
"code": 91,
124-
"errmsg": "Replication is being shut down",
125-
"errorLabels": [
126-
"RetryableWriteError"
127-
]
127+
"errmsg": "Replication is being shut down"
128128
}
129129
}
130130
},

tests/SpecTests/retryable-writes/deleteOne-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@
7575
"failCommands": [
7676
"delete"
7777
],
78+
"errorLabels": [
79+
"RetryableWriteError"
80+
],
7881
"writeConcernError": {
7982
"code": 91,
80-
"errmsg": "Replication is being shut down",
81-
"errorLabels": [
82-
"RetryableWriteError"
83-
]
83+
"errmsg": "Replication is being shut down"
8484
}
8585
}
8686
},

tests/SpecTests/retryable-writes/findOneAndDelete-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@
8181
"failCommands": [
8282
"findAndModify"
8383
],
84+
"errorLabels": [
85+
"RetryableWriteError"
86+
],
8487
"writeConcernError": {
8588
"code": 91,
86-
"errmsg": "Replication is being shut down",
87-
"errorLabels": [
88-
"RetryableWriteError"
89-
]
89+
"errmsg": "Replication is being shut down"
9090
}
9191
}
9292
},

tests/SpecTests/retryable-writes/findOneAndReplace-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@
8585
"failCommands": [
8686
"findAndModify"
8787
],
88+
"errorLabels": [
89+
"RetryableWriteError"
90+
],
8891
"writeConcernError": {
8992
"code": 91,
90-
"errmsg": "Replication is being shut down",
91-
"errorLabels": [
92-
"RetryableWriteError"
93-
]
93+
"errmsg": "Replication is being shut down"
9494
}
9595
}
9696
},

tests/SpecTests/retryable-writes/findOneAndUpdate-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@
8686
"failCommands": [
8787
"findAndModify"
8888
],
89+
"errorLabels": [
90+
"RetryableWriteError"
91+
],
8992
"writeConcernError": {
9093
"code": 91,
91-
"errmsg": "Replication is being shut down",
92-
"errorLabels": [
93-
"RetryableWriteError"
94-
]
94+
"errmsg": "Replication is being shut down"
9595
}
9696
}
9797
},

tests/SpecTests/retryable-writes/insertMany-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
"failCommands": [
9393
"insert"
9494
],
95+
"errorLabels": [
96+
"RetryableWriteError"
97+
],
9598
"writeConcernError": {
9699
"code": 91,
97-
"errmsg": "Replication is being shut down",
98-
"errorLabels": [
99-
"RetryableWriteError"
100-
]
100+
"errmsg": "Replication is being shut down"
101101
}
102102
}
103103
},

tests/SpecTests/retryable-writes/insertOne-serverErrors.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -761,12 +761,12 @@
761761
"failCommands": [
762762
"insert"
763763
],
764+
"errorLabels": [
765+
"RetryableWriteError"
766+
],
764767
"writeConcernError": {
765768
"code": 11600,
766-
"errmsg": "Replication is being shut down",
767-
"errorLabels": [
768-
"RetryableWriteError"
769-
]
769+
"errmsg": "Replication is being shut down"
770770
}
771771
}
772772
},
@@ -812,12 +812,12 @@
812812
"failCommands": [
813813
"insert"
814814
],
815+
"errorLabels": [
816+
"RetryableWriteError"
817+
],
815818
"writeConcernError": {
816819
"code": 11602,
817-
"errmsg": "Replication is being shut down",
818-
"errorLabels": [
819-
"RetryableWriteError"
820-
]
820+
"errmsg": "Replication is being shut down"
821821
}
822822
}
823823
},
@@ -863,12 +863,12 @@
863863
"failCommands": [
864864
"insert"
865865
],
866+
"errorLabels": [
867+
"RetryableWriteError"
868+
],
866869
"writeConcernError": {
867870
"code": 189,
868-
"errmsg": "Replication is being shut down",
869-
"errorLabels": [
870-
"RetryableWriteError"
871-
]
871+
"errmsg": "Replication is being shut down"
872872
}
873873
}
874874
},
@@ -914,12 +914,12 @@
914914
"failCommands": [
915915
"insert"
916916
],
917+
"errorLabels": [
918+
"RetryableWriteError"
919+
],
917920
"writeConcernError": {
918921
"code": 91,
919-
"errmsg": "Replication is being shut down",
920-
"errorLabels": [
921-
"RetryableWriteError"
922-
]
922+
"errmsg": "Replication is being shut down"
923923
}
924924
}
925925
},
@@ -965,12 +965,12 @@
965965
"failCommands": [
966966
"insert"
967967
],
968+
"errorLabels": [
969+
"RetryableWriteError"
970+
],
968971
"writeConcernError": {
969972
"code": 91,
970-
"errmsg": "Replication is being shut down",
971-
"errorLabels": [
972-
"RetryableWriteError"
973-
]
973+
"errmsg": "Replication is being shut down"
974974
}
975975
}
976976
},

tests/SpecTests/retryable-writes/replaceOne-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@
8585
"failCommands": [
8686
"update"
8787
],
88+
"errorLabels": [
89+
"RetryableWriteError"
90+
],
8891
"writeConcernError": {
8992
"code": 91,
90-
"errmsg": "Replication is being shut down",
91-
"errorLabels": [
92-
"RetryableWriteError"
93-
]
93+
"errmsg": "Replication is being shut down"
9494
}
9595
}
9696
},

tests/SpecTests/retryable-writes/updateOne-serverErrors.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@
8686
"failCommands": [
8787
"update"
8888
],
89+
"errorLabels": [
90+
"RetryableWriteError"
91+
],
8992
"writeConcernError": {
9093
"code": 91,
91-
"errmsg": "Replication is being shut down",
92-
"errorLabels": [
93-
"RetryableWriteError"
94-
]
94+
"errmsg": "Replication is being shut down"
9595
}
9696
}
9797
},

tests/SpecTests/transactions/error-labels.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -963,12 +963,12 @@
963963
"failCommands": [
964964
"commitTransaction"
965965
],
966+
"errorLabels": [
967+
"RetryableWriteError"
968+
],
966969
"writeConcernError": {
967970
"code": 91,
968-
"errmsg": "Replication is being shut down",
969-
"errorLabels": [
970-
"RetryableWriteError"
971-
]
971+
"errmsg": "Replication is being shut down"
972972
}
973973
}
974974
},

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@
180180
"failCommands": [
181181
"commitTransaction"
182182
],
183+
"errorLabels": [
184+
"RetryableWriteError"
185+
],
183186
"writeConcernError": {
184187
"code": 91,
185-
"errmsg": "Replication is being shut down",
186-
"errorLabels": [
187-
"RetryableWriteError"
188-
]
188+
"errmsg": "Replication is being shut down"
189189
}
190190
}
191191
}

tests/SpecTests/transactions/retryable-abort.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,11 +1556,11 @@
15561556
"failCommands": [
15571557
"abortTransaction"
15581558
],
1559+
"errorLabels": [
1560+
"RetryableWriteError"
1561+
],
15591562
"writeConcernError": {
15601563
"code": 11600,
1561-
"errorLabels": [
1562-
"RetryableWriteError"
1563-
],
15641564
"errmsg": "Replication is being shut down"
15651565
}
15661566
}
@@ -1673,11 +1673,11 @@
16731673
"failCommands": [
16741674
"abortTransaction"
16751675
],
1676+
"errorLabels": [
1677+
"RetryableWriteError"
1678+
],
16761679
"writeConcernError": {
16771680
"code": 11602,
1678-
"errorLabels": [
1679-
"RetryableWriteError"
1680-
],
16811681
"errmsg": "Replication is being shut down"
16821682
}
16831683
}
@@ -1790,11 +1790,11 @@
17901790
"failCommands": [
17911791
"abortTransaction"
17921792
],
1793+
"errorLabels": [
1794+
"RetryableWriteError"
1795+
],
17931796
"writeConcernError": {
17941797
"code": 189,
1795-
"errorLabels": [
1796-
"RetryableWriteError"
1797-
],
17981798
"errmsg": "Replication is being shut down"
17991799
}
18001800
}
@@ -1907,11 +1907,11 @@
19071907
"failCommands": [
19081908
"abortTransaction"
19091909
],
1910+
"errorLabels": [
1911+
"RetryableWriteError"
1912+
],
19101913
"writeConcernError": {
19111914
"code": 91,
1912-
"errorLabels": [
1913-
"RetryableWriteError"
1914-
],
19151915
"errmsg": "Replication is being shut down"
19161916
}
19171917
}

tests/SpecTests/transactions/retryable-commit.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,11 +1855,11 @@
18551855
"failCommands": [
18561856
"commitTransaction"
18571857
],
1858+
"errorLabels": [
1859+
"RetryableWriteError"
1860+
],
18581861
"writeConcernError": {
18591862
"code": 11600,
1860-
"errorLabels": [
1861-
"RetryableWriteError"
1862-
],
18631863
"errmsg": "Replication is being shut down"
18641864
}
18651865
}
@@ -1977,11 +1977,11 @@
19771977
"failCommands": [
19781978
"commitTransaction"
19791979
],
1980+
"errorLabels": [
1981+
"RetryableWriteError"
1982+
],
19801983
"writeConcernError": {
19811984
"code": 11602,
1982-
"errorLabels": [
1983-
"RetryableWriteError"
1984-
],
19851985
"errmsg": "Replication is being shut down"
19861986
}
19871987
}
@@ -2099,11 +2099,11 @@
20992099
"failCommands": [
21002100
"commitTransaction"
21012101
],
2102+
"errorLabels": [
2103+
"RetryableWriteError"
2104+
],
21022105
"writeConcernError": {
21032106
"code": 189,
2104-
"errorLabels": [
2105-
"RetryableWriteError"
2106-
],
21072107
"errmsg": "Replication is being shut down"
21082108
}
21092109
}
@@ -2221,11 +2221,11 @@
22212221
"failCommands": [
22222222
"commitTransaction"
22232223
],
2224+
"errorLabels": [
2225+
"RetryableWriteError"
2226+
],
22242227
"writeConcernError": {
22252228
"code": 91,
2226-
"errorLabels": [
2227-
"RetryableWriteError"
2228-
],
22292229
"errmsg": "Replication is being shut down"
22302230
}
22312231
}

0 commit comments

Comments
 (0)