| 1 | { |
| 2 | "description": "Do not check errmsg when code exists", |
| 3 | "uri": "mongodb://a/?replicaSet=rs", |
| 4 | "phases": [ |
| 5 | { |
| 6 | "description": "Primary A is discovered", |
| 7 | "responses": [ |
| 8 | [ |
| 9 | "a:27017", |
| 10 | { |
| 11 | "ok": 1, |
| 12 | "helloOk": true, |
| 13 | "isWritablePrimary": true, |
| 14 | "hosts": [ |
| 15 | "a:27017" |
| 16 | ], |
| 17 | "setName": "rs", |
| 18 | "minWireVersion": 0, |
| 19 | "maxWireVersion": 9, |
| 20 | "topologyVersion": { |
| 21 | "processId": { |
| 22 | "$oid": "000000000000000000000001" |
| 23 | }, |
| 24 | "counter": { |
| 25 | "$numberLong": "1" |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | ] |
| 30 | ], |
| 31 | "outcome": { |
| 32 | "servers": { |
| 33 | "a:27017": { |
| 34 | "type": "RSPrimary", |
| 35 | "setName": "rs", |
| 36 | "topologyVersion": { |
| 37 | "processId": { |
| 38 | "$oid": "000000000000000000000001" |
| 39 | }, |
| 40 | "counter": { |
| 41 | "$numberLong": "1" |
| 42 | } |
| 43 | }, |
| 44 | "pool": { |
| 45 | "generation": 0 |
| 46 | } |
| 47 | } |
| 48 | }, |
| 49 | "topologyType": "ReplicaSetWithPrimary", |
| 50 | "logicalSessionTimeoutMinutes": null, |
| 51 | "setName": "rs" |
| 52 | } |
| 53 | }, |
| 54 | { |
| 55 | "description": "errmsg \"not master\" gets ignored when error code exists", |
| 56 | "applicationErrors": [ |
| 57 | { |
| 58 | "address": "a:27017", |
| 59 | "when": "afterHandshakeCompletes", |
| 60 | "maxWireVersion": 9, |
| 61 | "type": "command", |
| 62 | "response": { |
| 63 | "ok": 0, |
| 64 | "errmsg": "not master", |
| 65 | "code": 1 |
| 66 | } |
| 67 | } |
| 68 | ], |
| 69 | "outcome": { |
| 70 | "servers": { |
| 71 | "a:27017": { |
| 72 | "type": "RSPrimary", |
| 73 | "setName": "rs", |
| 74 | "topologyVersion": { |
| 75 | "processId": { |
| 76 | "$oid": "000000000000000000000001" |
| 77 | }, |
| 78 | "counter": { |
| 79 | "$numberLong": "1" |
| 80 | } |
| 81 | }, |
| 82 | "pool": { |
| 83 | "generation": 0 |
| 84 | } |
| 85 | } |
| 86 | }, |
| 87 | "topologyType": "ReplicaSetWithPrimary", |
| 88 | "logicalSessionTimeoutMinutes": null, |
| 89 | "setName": "rs" |
| 90 | } |
| 91 | }, |
| 92 | { |
| 93 | "description": "errmsg \"node is recovering\" gets ignored when error code exists", |
| 94 | "applicationErrors": [ |
| 95 | { |
| 96 | "address": "a:27017", |
| 97 | "when": "afterHandshakeCompletes", |
| 98 | "maxWireVersion": 9, |
| 99 | "type": "command", |
| 100 | "response": { |
| 101 | "ok": 0, |
| 102 | "errmsg": "node is recovering", |
| 103 | "code": 1 |
| 104 | } |
| 105 | } |
| 106 | ], |
| 107 | "outcome": { |
| 108 | "servers": { |
| 109 | "a:27017": { |
| 110 | "type": "RSPrimary", |
| 111 | "setName": "rs", |
| 112 | "topologyVersion": { |
| 113 | "processId": { |
| 114 | "$oid": "000000000000000000000001" |
| 115 | }, |
| 116 | "counter": { |
| 117 | "$numberLong": "1" |
| 118 | } |
| 119 | }, |
| 120 | "pool": { |
| 121 | "generation": 0 |
| 122 | } |
| 123 | } |
| 124 | }, |
| 125 | "topologyType": "ReplicaSetWithPrimary", |
| 126 | "logicalSessionTimeoutMinutes": null, |
| 127 | "setName": "rs" |
| 128 | } |
| 129 | } |
| 130 | ] |
| 131 | } |