1{ 2 "runOn": [ 3 { 4 "minServerVersion": "4.0", 5 "topology": [ 6 "single", 7 "replicaset" 8 ] 9 }, 10 { 11 "minServerVersion": "4.1.7", 12 "topology": [ 13 "sharded" 14 ] 15 } 16 ], 17 "database_name": "retryable-reads-tests", 18 "collection_name": "coll", 19 "data": [], 20 "tests": [ 21 { 22 "description": "ListDatabaseNames succeeds after InterruptedAtShutdown", 23 "failPoint": { 24 "configureFailPoint": "failCommand", 25 "mode": { 26 "times": 1 27 }, 28 "data": { 29 "failCommands": [ 30 "listDatabases" 31 ], 32 "errorCode": 11600 33 } 34 }, 35 "operations": [ 36 { 37 "name": "listDatabaseNames", 38 "object": "client" 39 } 40 ], 41 "expectations": [ 42 { 43 "command_started_event": { 44 "command": { 45 "listDatabases": 1 46 } 47 } 48 }, 49 { 50 "command_started_event": { 51 "command": { 52 "listDatabases": 1 53 } 54 } 55 } 56 ] 57 }, 58 { 59 "description": "ListDatabaseNames succeeds after InterruptedDueToReplStateChange", 60 "failPoint": { 61 "configureFailPoint": "failCommand", 62 "mode": { 63 "times": 1 64 }, 65 "data": { 66 "failCommands": [ 67 "listDatabases" 68 ], 69 "errorCode": 11602 70 } 71 }, 72 "operations": [ 73 { 74 "name": "listDatabaseNames", 75 "object": "client" 76 } 77 ], 78 "expectations": [ 79 { 80 "command_started_event": { 81 "command": { 82 "listDatabases": 1 83 } 84 } 85 }, 86 { 87 "command_started_event": { 88 "command": { 89 "listDatabases": 1 90 } 91 } 92 } 93 ] 94 }, 95 { 96 "description": "ListDatabaseNames succeeds after NotMaster", 97 "failPoint": { 98 "configureFailPoint": "failCommand", 99 "mode": { 100 "times": 1 101 }, 102 "data": { 103 "failCommands": [ 104 "listDatabases" 105 ], 106 "errorCode": 10107 107 } 108 }, 109 "operations": [ 110 { 111 "name": "listDatabaseNames", 112 "object": "client" 113 } 114 ], 115 "expectations": [ 116 { 117 "command_started_event": { 118 "command": { 119 "listDatabases": 1 120 } 121 } 122 }, 123 { 124 "command_started_event": { 125 "command": { 126 "listDatabases": 1 127 } 128 } 129 } 130 ] 131 }, 132 { 133 "description": "ListDatabaseNames succeeds after NotMasterNoSlaveOk", 134 "failPoint": { 135 "configureFailPoint": "failCommand", 136 "mode": { 137 "times": 1 138 }, 139 "data": { 140 "failCommands": [ 141 "listDatabases" 142 ], 143 "errorCode": 13435 144 } 145 }, 146 "operations": [ 147 { 148 "name": "listDatabaseNames", 149 "object": "client" 150 } 151 ], 152 "expectations": [ 153 { 154 "command_started_event": { 155 "command": { 156 "listDatabases": 1 157 } 158 } 159 }, 160 { 161 "command_started_event": { 162 "command": { 163 "listDatabases": 1 164 } 165 } 166 } 167 ] 168 }, 169 { 170 "description": "ListDatabaseNames succeeds after NotMasterOrSecondary", 171 "failPoint": { 172 "configureFailPoint": "failCommand", 173 "mode": { 174 "times": 1 175 }, 176 "data": { 177 "failCommands": [ 178 "listDatabases" 179 ], 180 "errorCode": 13436 181 } 182 }, 183 "operations": [ 184 { 185 "name": "listDatabaseNames", 186 "object": "client" 187 } 188 ], 189 "expectations": [ 190 { 191 "command_started_event": { 192 "command": { 193 "listDatabases": 1 194 } 195 } 196 }, 197 { 198 "command_started_event": { 199 "command": { 200 "listDatabases": 1 201 } 202 } 203 } 204 ] 205 }, 206 { 207 "description": "ListDatabaseNames succeeds after PrimarySteppedDown", 208 "failPoint": { 209 "configureFailPoint": "failCommand", 210 "mode": { 211 "times": 1 212 }, 213 "data": { 214 "failCommands": [ 215 "listDatabases" 216 ], 217 "errorCode": 189 218 } 219 }, 220 "operations": [ 221 { 222 "name": "listDatabaseNames", 223 "object": "client" 224 } 225 ], 226 "expectations": [ 227 { 228 "command_started_event": { 229 "command": { 230 "listDatabases": 1 231 } 232 } 233 }, 234 { 235 "command_started_event": { 236 "command": { 237 "listDatabases": 1 238 } 239 } 240 } 241 ] 242 }, 243 { 244 "description": "ListDatabaseNames succeeds after ShutdownInProgress", 245 "failPoint": { 246 "configureFailPoint": "failCommand", 247 "mode": { 248 "times": 1 249 }, 250 "data": { 251 "failCommands": [ 252 "listDatabases" 253 ], 254 "errorCode": 91 255 } 256 }, 257 "operations": [ 258 { 259 "name": "listDatabaseNames", 260 "object": "client" 261 } 262 ], 263 "expectations": [ 264 { 265 "command_started_event": { 266 "command": { 267 "listDatabases": 1 268 } 269 } 270 }, 271 { 272 "command_started_event": { 273 "command": { 274 "listDatabases": 1 275 } 276 } 277 } 278 ] 279 }, 280 { 281 "description": "ListDatabaseNames succeeds after HostNotFound", 282 "failPoint": { 283 "configureFailPoint": "failCommand", 284 "mode": { 285 "times": 1 286 }, 287 "data": { 288 "failCommands": [ 289 "listDatabases" 290 ], 291 "errorCode": 7 292 } 293 }, 294 "operations": [ 295 { 296 "name": "listDatabaseNames", 297 "object": "client" 298 } 299 ], 300 "expectations": [ 301 { 302 "command_started_event": { 303 "command": { 304 "listDatabases": 1 305 } 306 } 307 }, 308 { 309 "command_started_event": { 310 "command": { 311 "listDatabases": 1 312 } 313 } 314 } 315 ] 316 }, 317 { 318 "description": "ListDatabaseNames succeeds after HostUnreachable", 319 "failPoint": { 320 "configureFailPoint": "failCommand", 321 "mode": { 322 "times": 1 323 }, 324 "data": { 325 "failCommands": [ 326 "listDatabases" 327 ], 328 "errorCode": 6 329 } 330 }, 331 "operations": [ 332 { 333 "name": "listDatabaseNames", 334 "object": "client" 335 } 336 ], 337 "expectations": [ 338 { 339 "command_started_event": { 340 "command": { 341 "listDatabases": 1 342 } 343 } 344 }, 345 { 346 "command_started_event": { 347 "command": { 348 "listDatabases": 1 349 } 350 } 351 } 352 ] 353 }, 354 { 355 "description": "ListDatabaseNames succeeds after NetworkTimeout", 356 "failPoint": { 357 "configureFailPoint": "failCommand", 358 "mode": { 359 "times": 1 360 }, 361 "data": { 362 "failCommands": [ 363 "listDatabases" 364 ], 365 "errorCode": 89 366 } 367 }, 368 "operations": [ 369 { 370 "name": "listDatabaseNames", 371 "object": "client" 372 } 373 ], 374 "expectations": [ 375 { 376 "command_started_event": { 377 "command": { 378 "listDatabases": 1 379 } 380 } 381 }, 382 { 383 "command_started_event": { 384 "command": { 385 "listDatabases": 1 386 } 387 } 388 } 389 ] 390 }, 391 { 392 "description": "ListDatabaseNames succeeds after SocketException", 393 "failPoint": { 394 "configureFailPoint": "failCommand", 395 "mode": { 396 "times": 1 397 }, 398 "data": { 399 "failCommands": [ 400 "listDatabases" 401 ], 402 "errorCode": 9001 403 } 404 }, 405 "operations": [ 406 { 407 "name": "listDatabaseNames", 408 "object": "client" 409 } 410 ], 411 "expectations": [ 412 { 413 "command_started_event": { 414 "command": { 415 "listDatabases": 1 416 } 417 } 418 }, 419 { 420 "command_started_event": { 421 "command": { 422 "listDatabases": 1 423 } 424 } 425 } 426 ] 427 }, 428 { 429 "description": "ListDatabaseNames fails after two NotMaster errors", 430 "failPoint": { 431 "configureFailPoint": "failCommand", 432 "mode": { 433 "times": 2 434 }, 435 "data": { 436 "failCommands": [ 437 "listDatabases" 438 ], 439 "errorCode": 10107 440 } 441 }, 442 "operations": [ 443 { 444 "name": "listDatabaseNames", 445 "object": "client", 446 "error": true 447 } 448 ], 449 "expectations": [ 450 { 451 "command_started_event": { 452 "command": { 453 "listDatabases": 1 454 } 455 } 456 }, 457 { 458 "command_started_event": { 459 "command": { 460 "listDatabases": 1 461 } 462 } 463 } 464 ] 465 }, 466 { 467 "description": "ListDatabaseNames fails after NotMaster when retryReads is false", 468 "clientOptions": { 469 "retryReads": false 470 }, 471 "failPoint": { 472 "configureFailPoint": "failCommand", 473 "mode": { 474 "times": 1 475 }, 476 "data": { 477 "failCommands": [ 478 "listDatabases" 479 ], 480 "errorCode": 10107 481 } 482 }, 483 "operations": [ 484 { 485 "name": "listDatabaseNames", 486 "object": "client", 487 "error": true 488 } 489 ], 490 "expectations": [ 491 { 492 "command_started_event": { 493 "command": { 494 "listDatabases": 1 495 } 496 } 497 } 498 ] 499 } 500 ] 501} 502