...
1# Autogenerated tests for SDAM error handling, see generate-error-tests.py
2description: Non-stale topologyVersion missing NotPrimaryOrSecondary error
3uri: mongodb://a/?replicaSet=rs
4phases:
5- description: Primary A is discovered
6 responses:
7 - - a:27017
8 - ok: 1
9 helloOk: true
10 isWritablePrimary: true
11 hosts:
12 - a:27017
13 setName: rs
14 minWireVersion: 0
15 maxWireVersion: 9
16 topologyVersion: &topologyVersion_1_1
17 processId:
18 "$oid": '000000000000000000000001'
19 counter:
20 "$numberLong": '1'
21 outcome: &outcome
22 servers:
23 a:27017:
24 type: RSPrimary
25 setName: rs
26 topologyVersion: *topologyVersion_1_1
27 pool:
28 generation: 0
29 topologyType: ReplicaSetWithPrimary
30 logicalSessionTimeoutMinutes: null
31 setName: rs
32
33- description: Non-stale topologyVersion missing NotPrimaryOrSecondary error marks server Unknown
34 applicationErrors:
35 - address: a:27017
36 when: afterHandshakeCompletes
37 maxWireVersion: 9
38 type: command
39 response:
40 ok: 0
41 errmsg: NotPrimaryOrSecondary
42 code: 13436
43 outcome:
44 servers:
45 a:27017:
46 type: Unknown
47 topologyVersion: null
48 pool:
49 generation: 0
50 topologyType: ReplicaSetNoPrimary
51 logicalSessionTimeoutMinutes: null
52 setName: rs
View as plain text