Skip to content

Commit db7c730

Browse files
authored
test(NODE-7432): sync spec tests for SDAM (#4885)
1 parent 4d6e2a2 commit db7c730

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-42
lines changed

test/spec/server-discovery-and-monitoring/errors/error_handling_handshake.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
}
8686
},
8787
{
88-
"description": "Mark server unknown on network timeout application error (beforeHandshakeCompletes)",
88+
"description": "Ignore network timeout application error (beforeHandshakeCompletes)",
8989
"applicationErrors": [
9090
{
9191
"address": "a:27017",
@@ -118,4 +118,4 @@
118118
}
119119
}
120120
]
121-
}
121+
}
Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
11
description: Network timeouts before and after the handshake completes
22
uri: mongodb://a/?replicaSet=rs
33
phases:
4-
- description: Primary A is discovered
5-
responses:
6-
- - a:27017
7-
- ok: 1
8-
helloOk: true
9-
isWritablePrimary: true
10-
hosts:
11-
- a:27017
4+
- description: Primary A is discovered
5+
responses:
6+
- - a:27017
7+
- ok: 1
8+
helloOk: true
9+
isWritablePrimary: true
10+
hosts:
11+
- a:27017
12+
setName: rs
13+
minWireVersion: 0
14+
maxWireVersion: 9
15+
topologyVersion: &topologyVersion_1_1
16+
processId:
17+
"$oid": '000000000000000000000001'
18+
counter:
19+
"$numberLong": '1'
20+
outcome: &outcome
21+
servers:
22+
a:27017:
23+
type: RSPrimary
24+
setName: rs
25+
topologyVersion: *topologyVersion_1_1
26+
pool:
27+
generation: 0
28+
topologyType: ReplicaSetWithPrimary
29+
logicalSessionTimeoutMinutes: null
1230
setName: rs
13-
minWireVersion: 0
14-
maxWireVersion: 9
15-
topologyVersion: &topologyVersion_1_1
16-
processId:
17-
"$oid": '000000000000000000000001'
18-
counter:
19-
"$numberLong": '1'
20-
outcome: &outcome
21-
servers:
22-
a:27017:
23-
type: RSPrimary
24-
setName: rs
25-
topologyVersion: *topologyVersion_1_1
26-
pool:
27-
generation: 0
28-
topologyType: ReplicaSetWithPrimary
29-
logicalSessionTimeoutMinutes: null
30-
setName: rs
3131

32-
- description: Ignore network timeout application error (afterHandshakeCompletes)
33-
applicationErrors:
34-
- address: a:27017
35-
when: afterHandshakeCompletes
36-
maxWireVersion: 9
37-
type: timeout
38-
outcome: *outcome
32+
- description: Ignore network timeout application error (afterHandshakeCompletes)
33+
applicationErrors:
34+
- address: a:27017
35+
when: afterHandshakeCompletes
36+
maxWireVersion: 9
37+
type: timeout
38+
outcome: *outcome
3939

40-
- description: Mark server unknown on network timeout application error (beforeHandshakeCompletes)
41-
applicationErrors:
42-
- address: a:27017
43-
when: beforeHandshakeCompletes
44-
maxWireVersion: 9
45-
type: timeout
46-
outcome: *outcome
40+
- description: Ignore network timeout application error (beforeHandshakeCompletes)
41+
# The test runner may need to add the SystemOverloadedError label for the pre-handshake network timeout.
42+
# The SystemOverloadedError label causes the error to be ignored.
43+
applicationErrors:
44+
- address: a:27017
45+
when: beforeHandshakeCompletes
46+
maxWireVersion: 9
47+
type: timeout
48+
outcome: *outcome

0 commit comments

Comments
 (0)