| 1 | { |
| 2 | "runOn": [ |
| 3 | { |
| 4 | "minServerVersion": "4.9" |
| 5 | } |
| 6 | ], |
| 7 | "database_name": "sdam-tests", |
| 8 | "collection_name": "hello-network-error", |
| 9 | "data": [], |
| 10 | "tests": [ |
| 11 | { |
| 12 | "description": "Network error on Monitor handshake", |
| 13 | "failPoint": { |
| 14 | "configureFailPoint": "failCommand", |
| 15 | "mode": { |
| 16 | "times": 2 |
| 17 | }, |
| 18 | "data": { |
| 19 | "failCommands": [ |
| 20 | "hello", |
| 21 | "isMaster" |
| 22 | ], |
| 23 | "appName": "networkErrorHandshakeTest", |
| 24 | "closeConnection": true |
| 25 | } |
| 26 | }, |
| 27 | "clientOptions": { |
| 28 | "retryWrites": false, |
| 29 | "connectTimeoutMS": 250, |
| 30 | "heartbeatFrequencyMS": 500, |
| 31 | "appname": "networkErrorHandshakeTest" |
| 32 | }, |
| 33 | "operations": [ |
| 34 | { |
| 35 | "name": "waitForEvent", |
| 36 | "object": "testRunner", |
| 37 | "arguments": { |
| 38 | "event": "ServerMarkedUnknownEvent", |
| 39 | "count": 1 |
| 40 | } |
| 41 | }, |
| 42 | { |
| 43 | "name": "insertMany", |
| 44 | "object": "collection", |
| 45 | "arguments": { |
| 46 | "documents": [ |
| 47 | { |
| 48 | "_id": 1 |
| 49 | }, |
| 50 | { |
| 51 | "_id": 2 |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | } |
| 56 | ], |
| 57 | "expectations": [ |
| 58 | { |
| 59 | "command_started_event": { |
| 60 | "command": { |
| 61 | "insert": "hello-network-error", |
| 62 | "documents": [ |
| 63 | { |
| 64 | "_id": 1 |
| 65 | }, |
| 66 | { |
| 67 | "_id": 2 |
| 68 | } |
| 69 | ] |
| 70 | }, |
| 71 | "command_name": "insert", |
| 72 | "database_name": "sdam-tests" |
| 73 | } |
| 74 | } |
| 75 | ], |
| 76 | "outcome": { |
| 77 | "collection": { |
| 78 | "data": [ |
| 79 | { |
| 80 | "_id": 1 |
| 81 | }, |
| 82 | { |
| 83 | "_id": 2 |
| 84 | } |
| 85 | ] |
| 86 | } |
| 87 | } |
| 88 | }, |
| 89 | { |
| 90 | "description": "Network error on Monitor check", |
| 91 | "clientOptions": { |
| 92 | "retryWrites": false, |
| 93 | "connectTimeoutMS": 250, |
| 94 | "heartbeatFrequencyMS": 500, |
| 95 | "appname": "networkErrorCheckTest" |
| 96 | }, |
| 97 | "operations": [ |
| 98 | { |
| 99 | "name": "insertMany", |
| 100 | "object": "collection", |
| 101 | "arguments": { |
| 102 | "documents": [ |
| 103 | { |
| 104 | "_id": 1 |
| 105 | }, |
| 106 | { |
| 107 | "_id": 2 |
| 108 | } |
| 109 | ] |
| 110 | } |
| 111 | }, |
| 112 | { |
| 113 | "name": "configureFailPoint", |
| 114 | "object": "testRunner", |
| 115 | "arguments": { |
| 116 | "failPoint": { |
| 117 | "configureFailPoint": "failCommand", |
| 118 | "mode": { |
| 119 | "times": 4 |
| 120 | }, |
| 121 | "data": { |
| 122 | "failCommands": [ |
| 123 | "hello", |
| 124 | "isMaster" |
| 125 | ], |
| 126 | "appName": "networkErrorCheckTest", |
| 127 | "closeConnection": true |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | }, |
| 132 | { |
| 133 | "name": "waitForEvent", |
| 134 | "object": "testRunner", |
| 135 | "arguments": { |
| 136 | "event": "ServerMarkedUnknownEvent", |
| 137 | "count": 1 |
| 138 | } |
| 139 | }, |
| 140 | { |
| 141 | "name": "waitForEvent", |
| 142 | "object": "testRunner", |
| 143 | "arguments": { |
| 144 | "event": "PoolClearedEvent", |
| 145 | "count": 1 |
| 146 | } |
| 147 | }, |
| 148 | { |
| 149 | "name": "insertMany", |
| 150 | "object": "collection", |
| 151 | "arguments": { |
| 152 | "documents": [ |
| 153 | { |
| 154 | "_id": 3 |
| 155 | }, |
| 156 | { |
| 157 | "_id": 4 |
| 158 | } |
| 159 | ] |
| 160 | } |
| 161 | } |
| 162 | ], |
| 163 | "expectations": [ |
| 164 | { |
| 165 | "command_started_event": { |
| 166 | "command": { |
| 167 | "insert": "hello-network-error", |
| 168 | "documents": [ |
| 169 | { |
| 170 | "_id": 1 |
| 171 | }, |
| 172 | { |
| 173 | "_id": 2 |
| 174 | } |
| 175 | ] |
| 176 | }, |
| 177 | "command_name": "insert", |
| 178 | "database_name": "sdam-tests" |
| 179 | } |
| 180 | }, |
| 181 | { |
| 182 | "command_started_event": { |
| 183 | "command": { |
| 184 | "insert": "hello-network-error", |
| 185 | "documents": [ |
| 186 | { |
| 187 | "_id": 3 |
| 188 | }, |
| 189 | { |
| 190 | "_id": 4 |
| 191 | } |
| 192 | ] |
| 193 | }, |
| 194 | "command_name": "insert", |
| 195 | "database_name": "sdam-tests" |
| 196 | } |
| 197 | } |
| 198 | ], |
| 199 | "outcome": { |
| 200 | "collection": { |
| 201 | "data": [ |
| 202 | { |
| 203 | "_id": 1 |
| 204 | }, |
| 205 | { |
| 206 | "_id": 2 |
| 207 | }, |
| 208 | { |
| 209 | "_id": 3 |
| 210 | }, |
| 211 | { |
| 212 | "_id": 4 |
| 213 | } |
| 214 | ] |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | ] |
| 219 | } |