Skip to content

Commit

Permalink
test(NODE-3733): Make retryable write test error labels behave consis…
Browse files Browse the repository at this point in the history
…tently with server (#3140)
  • Loading branch information
nbbeeken authored Feb 9, 2022
1 parent 3807d01 commit 489e05b
Show file tree
Hide file tree
Showing 69 changed files with 109 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const { loadSpecTests } = require('../../spec');
const { legacyRunOnToRunOnRequirement } = require('../../tools/spec-runner');
const { isAnyRequirementSatisfied } = require('../../tools/unified-spec-runner/unified-utils');

describe('Retryable Writes', function () {
describe('Legacy Retryable Writes specs', function () {
let ctx = {};
const retryableWrites = loadSpecTests('retryable-writes');
const retryableWrites = loadSpecTests('retryable-writes/legacy');

for (const suite of retryableWrites) {
describe(suite.name, function () {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "bulkWrite"
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
"failCommands": [
"delete"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["delete"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "deleteOne"
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
"failCommands": [
"findAndModify"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["findAndModify"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "findOneAndDelete"
arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@
"failCommands": [
"findAndModify"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["findAndModify"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "findOneAndReplace"
arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@
"failCommands": [
"findAndModify"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["findAndModify"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "findOneAndUpdate"
arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "insertMany"
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -761,12 +761,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 11600,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down Expand Up @@ -812,12 +812,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 11602,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down Expand Up @@ -863,12 +863,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 189,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down Expand Up @@ -914,12 +914,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down Expand Up @@ -965,12 +965,12 @@
"failCommands": [
"insert"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 11600
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "insertOne"
arguments:
Expand All @@ -370,10 +370,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 11602
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "insertOne"
arguments:
Expand All @@ -393,10 +393,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 189
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "insertOne"
arguments:
Expand All @@ -416,10 +416,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "insertOne"
arguments:
Expand All @@ -439,10 +439,10 @@ tests:
mode: { times: 2 }
data:
failCommands: ["insert"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "insertOne"
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@
"failCommands": [
"update"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["update"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "replaceOne"
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@
"failCommands": [
"update"
],
"errorLabels": [
"RetryableWriteError"
],
"writeConcernError": {
"code": 91,
"errmsg": "Replication is being shut down",
"errorLabels": [
"RetryableWriteError"
]
"errmsg": "Replication is being shut down"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ tests:
mode: { times: 1 }
data:
failCommands: ["update"]
errorLabels: ["RetryableWriteError"]
writeConcernError:
code: 91
errmsg: Replication is being shut down
errorLabels: ["RetryableWriteError"]
operation:
name: "updateOne"
arguments:
Expand Down
File renamed without changes.
File renamed without changes.
Empty file.
Loading

0 comments on commit 489e05b

Please sign in to comment.