Skip to content

Commit 2adc7cd

Browse files
test(NODE-3787): sync preferring error codes over messages (#3104)
1 parent b3d9fb8 commit 2adc7cd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/spec/server-discovery-and-monitoring/errors/prefer-error-code.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353
},
5454
{
55-
"description": "errmsg \"not writable primary\" gets ignored when error code exists",
55+
"description": "errmsg \"not master\" gets ignored when error code exists",
5656
"applicationErrors": [
5757
{
5858
"address": "a:27017",
@@ -61,7 +61,7 @@
6161
"type": "command",
6262
"response": {
6363
"ok": 0,
64-
"errmsg": "not writable primary",
64+
"errmsg": "not master",
6565
"code": 1
6666
}
6767
}

test/spec/server-discovery-and-monitoring/errors/prefer-error-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ phases:
2929
logicalSessionTimeoutMinutes: null
3030
setName: rs
3131

32-
- description: errmsg "not writable primary" gets ignored when error code exists
32+
- description: errmsg "not master" gets ignored when error code exists
3333
applicationErrors:
3434
- address: a:27017
3535
when: afterHandshakeCompletes
3636
maxWireVersion: 9
3737
type: command
3838
response:
3939
ok: 0
40-
errmsg: "not writable primary"
40+
errmsg: "not master" # NOTE: This needs to be "not master" and not "not writable primary".
4141
code: 1 # Not a "not writable primary" error code.
4242
outcome: *outcome
4343

0 commit comments

Comments
 (0)