Skip to content

Commit 3807d01

Browse files
authored
test(NODE-3885): update spec tests to remove legacy language (#3139)
1 parent 44bbd6e commit 3807d01

File tree

14 files changed

+34
-32
lines changed

14 files changed

+34
-32
lines changed

test/spec/retryable-writes/insertOne-serverErrors.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
}
119119
},
120120
{
121-
"description": "InsertOne succeeds after NotMaster",
121+
"description": "InsertOne succeeds after NotWritablePrimary",
122122
"failPoint": {
123123
"configureFailPoint": "failCommand",
124124
"mode": {
@@ -167,7 +167,7 @@
167167
}
168168
},
169169
{
170-
"description": "InsertOne succeeds after NotMasterOrSecondary",
170+
"description": "InsertOne succeeds after NotPrimaryOrSecondary",
171171
"failPoint": {
172172
"configureFailPoint": "failCommand",
173173
"mode": {
@@ -216,7 +216,7 @@
216216
}
217217
},
218218
{
219-
"description": "InsertOne succeeds after NotMasterNoSlaveOk",
219+
"description": "InsertOne succeeds after NotPrimaryNoSecondaryOk",
220220
"failPoint": {
221221
"configureFailPoint": "failCommand",
222222
"mode": {

test/spec/retryable-writes/insertOne-serverErrors.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ tests:
5656
- { _id: 1, x: 11 }
5757
- { _id: 2, x: 22 }
5858
-
59-
description: "InsertOne succeeds after NotMaster"
59+
description: "InsertOne succeeds after NotWritablePrimary"
6060
failPoint:
6161
configureFailPoint: failCommand
6262
mode: { times: 1 }
@@ -78,7 +78,7 @@ tests:
7878
- { _id: 2, x: 22 }
7979
- { _id: 3, x: 33 }
8080
-
81-
description: "InsertOne succeeds after NotMasterOrSecondary"
81+
description: "InsertOne succeeds after NotPrimaryOrSecondary"
8282
failPoint:
8383
configureFailPoint: failCommand
8484
mode: { times: 1 }
@@ -100,7 +100,7 @@ tests:
100100
- { _id: 2, x: 22 }
101101
- { _id: 3, x: 33 }
102102
-
103-
description: "InsertOne succeeds after NotMasterNoSlaveOk"
103+
description: "InsertOne succeeds after NotPrimaryNoSecondaryOk"
104104
failPoint:
105105
configureFailPoint: failCommand
106106
mode: { times: 1 }

test/spec/transactions-convenient-api/commit-retry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
}
294294
},
295295
{
296-
"description": "commit is retried after commitTransaction UnknownTransactionCommitResult (NotMaster)",
296+
"description": "commit is retried after commitTransaction UnknownTransactionCommitResult (NotWritablePrimary)",
297297
"failPoint": {
298298
"configureFailPoint": "failCommand",
299299
"mode": {

test/spec/transactions-convenient-api/commit-retry.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ tests:
185185
data:
186186
- { _id: 1 }
187187
-
188-
description: commit is retried after commitTransaction UnknownTransactionCommitResult (NotMaster)
188+
description: commit is retried after commitTransaction UnknownTransactionCommitResult (NotWritablePrimary)
189189
failPoint:
190190
configureFailPoint: failCommand
191191
mode: { times: 2 }
192192
data:
193193
failCommands: ["commitTransaction"]
194-
errorCode: 10107 # NotMaster
194+
errorCode: 10107 # NotWritablePrimary
195195
errorLabels: ["RetryableWriteError"] # SPEC-1565
196196
closeConnection: false
197197
operations:

test/spec/transactions/legacy/error-labels.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
}
104104
},
105105
{
106-
"description": "NotMaster errors contain transient label",
106+
"description": "NotWritablePrimary errors contain transient label",
107107
"failPoint": {
108108
"configureFailPoint": "failCommand",
109109
"mode": {

test/spec/transactions/legacy/error-labels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ tests:
6868
collection:
6969
data: []
7070

71-
- description: NotMaster errors contain transient label
71+
- description: NotWritablePrimary errors contain transient label
7272

7373
failPoint:
7474
configureFailPoint: failCommand
7575
mode: { times: 1 }
7676
data:
7777
failCommands: ["insert"]
78-
errorCode: 10107 # NotMaster
78+
errorCode: 10107 # NotWritablePrimary
7979

8080
operations:
8181
- name: startTransaction

test/spec/transactions/legacy/mongos-recovery-token.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@
307307
"data": {
308308
"failCommands": [
309309
"commitTransaction",
310-
"isMaster"
310+
"isMaster",
311+
"hello"
311312
],
312313
"closeConnection": true
313314
}

test/spec/transactions/legacy/mongos-recovery-token.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ tests:
196196
result:
197197
insertedId: 1
198198
# Enable the fail point only on the Mongos that session0 is pinned to.
199-
# Fail isMaster to prevent the heartbeat requested directly after the
199+
# Fail hello/legacy hello to prevent the heartbeat requested directly after the
200200
# retryable commit error from racing with server selection for the retry.
201201
# Note: times: 7 is slightly artbitrary but it accounts for one failed
202202
# commit and some SDAM heartbeats. A test runner will have multiple
@@ -210,15 +210,15 @@ tests:
210210
configureFailPoint: failCommand
211211
mode: { times: 7 }
212212
data:
213-
failCommands: ["commitTransaction", "isMaster"]
213+
failCommands: ["commitTransaction", "isMaster", "hello"]
214214
closeConnection: true
215215
# The first commitTransaction sees a retryable connection error due to
216216
# the fail point and also fails on the server. The retry attempt on a
217217
# new mongos will wait for the transaction to timeout and will fail
218218
# because the transaction was aborted. Note that the retry attempt should
219219
# not select the original mongos because that server's SDAM state is
220220
# reset by the connection error, heartbeatFrequencyMS is high, and
221-
# subsequent isMaster heartbeats should fail.
221+
# subsequent heartbeats should fail.
222222
- name: commitTransaction
223223
object: session0
224224
result:

test/spec/transactions/legacy/pin-mongos.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,8 @@
11071107
"data": {
11081108
"failCommands": [
11091109
"insert",
1110-
"isMaster"
1110+
"isMaster",
1111+
"hello"
11111112
],
11121113
"closeConnection": true
11131114
}

test/spec/transactions/legacy/pin-mongos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ tests:
464464
result:
465465
insertedId: 3
466466
# Enable the fail point only on the Mongos that session0 is pinned to.
467-
# Fail isMaster to prevent the heartbeat requested directly after the
467+
# Fail hello/legacy hello to prevent the heartbeat requested directly after the
468468
# insert error from racing with server selection for the commit.
469469
# Note: times: 7 is slightly artbitrary but it accounts for one failed
470470
# insert and some SDAM heartbeats. A test runner will have multiple
@@ -478,7 +478,7 @@ tests:
478478
configureFailPoint: failCommand
479479
mode: { times: 7 }
480480
data:
481-
failCommands: ["insert", "isMaster"]
481+
failCommands: ["insert", "isMaster", "hello"]
482482
closeConnection: true
483483
- name: insertOne
484484
object: collection
@@ -498,7 +498,7 @@ tests:
498498
#
499499
# Note that the commit attempt should not select the original mongos
500500
# because that server's SDAM state is reset by the connection error,
501-
# heartbeatFrequencyMS is high, and subsequent isMaster heartbeats
501+
# heartbeatFrequencyMS is high, and subsequent heartbeats
502502
# should fail.
503503
- name: commitTransaction
504504
object: session0

0 commit comments

Comments
 (0)