...

Text file src/go.mongodb.org/mongo-driver/testdata/client-side-operations-timeout/retryability-legacy-timeouts.json

Documentation: go.mongodb.org/mongo-driver/testdata/client-side-operations-timeout

     1{
     2  "description": "legacy timeouts behave correctly for retryable operations",
     3  "schemaVersion": "1.9",
     4  "runOnRequirements": [
     5    {
     6      "minServerVersion": "4.4",
     7      "topologies": [
     8        "replicaset",
     9        "sharded-replicaset"
    10      ]
    11    }
    12  ],
    13  "createEntities": [
    14    {
    15      "client": {
    16        "id": "failPointClient",
    17        "useMultipleMongoses": false
    18      }
    19    },
    20    {
    21      "client": {
    22        "id": "client",
    23        "uriOptions": {
    24          "socketTimeoutMS": 100
    25        },
    26        "useMultipleMongoses": false,
    27        "observeEvents": [
    28          "commandStartedEvent"
    29        ],
    30        "ignoreCommandMonitoringEvents": [
    31          "killCursors"
    32        ]
    33      }
    34    },
    35    {
    36      "database": {
    37        "id": "database",
    38        "client": "client",
    39        "databaseName": "test"
    40      }
    41    },
    42    {
    43      "collection": {
    44        "id": "collection",
    45        "database": "database",
    46        "collectionName": "coll"
    47      }
    48    }
    49  ],
    50  "initialData": [
    51    {
    52      "collectionName": "coll",
    53      "databaseName": "test",
    54      "documents": []
    55    }
    56  ],
    57  "tests": [
    58    {
    59      "description": "operation succeeds after one socket timeout - insertOne on collection",
    60      "operations": [
    61        {
    62          "name": "failPoint",
    63          "object": "testRunner",
    64          "arguments": {
    65            "client": "failPointClient",
    66            "failPoint": {
    67              "configureFailPoint": "failCommand",
    68              "mode": {
    69                "times": 1
    70              },
    71              "data": {
    72                "failCommands": [
    73                  "insert"
    74                ],
    75                "blockConnection": true,
    76                "blockTimeMS": 110
    77              }
    78            }
    79          }
    80        },
    81        {
    82          "name": "insertOne",
    83          "object": "collection",
    84          "arguments": {
    85            "document": {
    86              "x": 1
    87            }
    88          }
    89        }
    90      ],
    91      "expectEvents": [
    92        {
    93          "client": "client",
    94          "events": [
    95            {
    96              "commandStartedEvent": {
    97                "commandName": "insert",
    98                "databaseName": "test",
    99                "command": {
   100                  "insert": "coll"
   101                }
   102              }
   103            },
   104            {
   105              "commandStartedEvent": {
   106                "commandName": "insert",
   107                "databaseName": "test",
   108                "command": {
   109                  "insert": "coll"
   110                }
   111              }
   112            }
   113          ]
   114        }
   115      ]
   116    },
   117    {
   118      "description": "operation fails after two consecutive socket timeouts - insertOne on collection",
   119      "operations": [
   120        {
   121          "name": "failPoint",
   122          "object": "testRunner",
   123          "arguments": {
   124            "client": "failPointClient",
   125            "failPoint": {
   126              "configureFailPoint": "failCommand",
   127              "mode": {
   128                "times": 2
   129              },
   130              "data": {
   131                "failCommands": [
   132                  "insert"
   133                ],
   134                "blockConnection": true,
   135                "blockTimeMS": 110
   136              }
   137            }
   138          }
   139        },
   140        {
   141          "name": "insertOne",
   142          "object": "collection",
   143          "arguments": {
   144            "document": {
   145              "x": 1
   146            }
   147          },
   148          "expectError": {
   149            "isClientError": true
   150          }
   151        }
   152      ],
   153      "expectEvents": [
   154        {
   155          "client": "client",
   156          "events": [
   157            {
   158              "commandStartedEvent": {
   159                "commandName": "insert",
   160                "databaseName": "test",
   161                "command": {
   162                  "insert": "coll"
   163                }
   164              }
   165            },
   166            {
   167              "commandStartedEvent": {
   168                "commandName": "insert",
   169                "databaseName": "test",
   170                "command": {
   171                  "insert": "coll"
   172                }
   173              }
   174            }
   175          ]
   176        }
   177      ]
   178    },
   179    {
   180      "description": "operation succeeds after one socket timeout - insertMany on collection",
   181      "operations": [
   182        {
   183          "name": "failPoint",
   184          "object": "testRunner",
   185          "arguments": {
   186            "client": "failPointClient",
   187            "failPoint": {
   188              "configureFailPoint": "failCommand",
   189              "mode": {
   190                "times": 1
   191              },
   192              "data": {
   193                "failCommands": [
   194                  "insert"
   195                ],
   196                "blockConnection": true,
   197                "blockTimeMS": 110
   198              }
   199            }
   200          }
   201        },
   202        {
   203          "name": "insertMany",
   204          "object": "collection",
   205          "arguments": {
   206            "documents": [
   207              {
   208                "x": 1
   209              }
   210            ]
   211          }
   212        }
   213      ],
   214      "expectEvents": [
   215        {
   216          "client": "client",
   217          "events": [
   218            {
   219              "commandStartedEvent": {
   220                "commandName": "insert",
   221                "databaseName": "test",
   222                "command": {
   223                  "insert": "coll"
   224                }
   225              }
   226            },
   227            {
   228              "commandStartedEvent": {
   229                "commandName": "insert",
   230                "databaseName": "test",
   231                "command": {
   232                  "insert": "coll"
   233                }
   234              }
   235            }
   236          ]
   237        }
   238      ]
   239    },
   240    {
   241      "description": "operation fails after two consecutive socket timeouts - insertMany on collection",
   242      "operations": [
   243        {
   244          "name": "failPoint",
   245          "object": "testRunner",
   246          "arguments": {
   247            "client": "failPointClient",
   248            "failPoint": {
   249              "configureFailPoint": "failCommand",
   250              "mode": {
   251                "times": 2
   252              },
   253              "data": {
   254                "failCommands": [
   255                  "insert"
   256                ],
   257                "blockConnection": true,
   258                "blockTimeMS": 110
   259              }
   260            }
   261          }
   262        },
   263        {
   264          "name": "insertMany",
   265          "object": "collection",
   266          "arguments": {
   267            "documents": [
   268              {
   269                "x": 1
   270              }
   271            ]
   272          },
   273          "expectError": {
   274            "isClientError": true
   275          }
   276        }
   277      ],
   278      "expectEvents": [
   279        {
   280          "client": "client",
   281          "events": [
   282            {
   283              "commandStartedEvent": {
   284                "commandName": "insert",
   285                "databaseName": "test",
   286                "command": {
   287                  "insert": "coll"
   288                }
   289              }
   290            },
   291            {
   292              "commandStartedEvent": {
   293                "commandName": "insert",
   294                "databaseName": "test",
   295                "command": {
   296                  "insert": "coll"
   297                }
   298              }
   299            }
   300          ]
   301        }
   302      ]
   303    },
   304    {
   305      "description": "operation succeeds after one socket timeout - deleteOne on collection",
   306      "operations": [
   307        {
   308          "name": "failPoint",
   309          "object": "testRunner",
   310          "arguments": {
   311            "client": "failPointClient",
   312            "failPoint": {
   313              "configureFailPoint": "failCommand",
   314              "mode": {
   315                "times": 1
   316              },
   317              "data": {
   318                "failCommands": [
   319                  "delete"
   320                ],
   321                "blockConnection": true,
   322                "blockTimeMS": 110
   323              }
   324            }
   325          }
   326        },
   327        {
   328          "name": "deleteOne",
   329          "object": "collection",
   330          "arguments": {
   331            "filter": {}
   332          }
   333        }
   334      ],
   335      "expectEvents": [
   336        {
   337          "client": "client",
   338          "events": [
   339            {
   340              "commandStartedEvent": {
   341                "commandName": "delete",
   342                "databaseName": "test",
   343                "command": {
   344                  "delete": "coll"
   345                }
   346              }
   347            },
   348            {
   349              "commandStartedEvent": {
   350                "commandName": "delete",
   351                "databaseName": "test",
   352                "command": {
   353                  "delete": "coll"
   354                }
   355              }
   356            }
   357          ]
   358        }
   359      ]
   360    },
   361    {
   362      "description": "operation fails after two consecutive socket timeouts - deleteOne on collection",
   363      "operations": [
   364        {
   365          "name": "failPoint",
   366          "object": "testRunner",
   367          "arguments": {
   368            "client": "failPointClient",
   369            "failPoint": {
   370              "configureFailPoint": "failCommand",
   371              "mode": {
   372                "times": 2
   373              },
   374              "data": {
   375                "failCommands": [
   376                  "delete"
   377                ],
   378                "blockConnection": true,
   379                "blockTimeMS": 110
   380              }
   381            }
   382          }
   383        },
   384        {
   385          "name": "deleteOne",
   386          "object": "collection",
   387          "arguments": {
   388            "filter": {}
   389          },
   390          "expectError": {
   391            "isClientError": true
   392          }
   393        }
   394      ],
   395      "expectEvents": [
   396        {
   397          "client": "client",
   398          "events": [
   399            {
   400              "commandStartedEvent": {
   401                "commandName": "delete",
   402                "databaseName": "test",
   403                "command": {
   404                  "delete": "coll"
   405                }
   406              }
   407            },
   408            {
   409              "commandStartedEvent": {
   410                "commandName": "delete",
   411                "databaseName": "test",
   412                "command": {
   413                  "delete": "coll"
   414                }
   415              }
   416            }
   417          ]
   418        }
   419      ]
   420    },
   421    {
   422      "description": "operation succeeds after one socket timeout - replaceOne on collection",
   423      "operations": [
   424        {
   425          "name": "failPoint",
   426          "object": "testRunner",
   427          "arguments": {
   428            "client": "failPointClient",
   429            "failPoint": {
   430              "configureFailPoint": "failCommand",
   431              "mode": {
   432                "times": 1
   433              },
   434              "data": {
   435                "failCommands": [
   436                  "update"
   437                ],
   438                "blockConnection": true,
   439                "blockTimeMS": 110
   440              }
   441            }
   442          }
   443        },
   444        {
   445          "name": "replaceOne",
   446          "object": "collection",
   447          "arguments": {
   448            "filter": {},
   449            "replacement": {
   450              "x": 1
   451            }
   452          }
   453        }
   454      ],
   455      "expectEvents": [
   456        {
   457          "client": "client",
   458          "events": [
   459            {
   460              "commandStartedEvent": {
   461                "commandName": "update",
   462                "databaseName": "test",
   463                "command": {
   464                  "update": "coll"
   465                }
   466              }
   467            },
   468            {
   469              "commandStartedEvent": {
   470                "commandName": "update",
   471                "databaseName": "test",
   472                "command": {
   473                  "update": "coll"
   474                }
   475              }
   476            }
   477          ]
   478        }
   479      ]
   480    },
   481    {
   482      "description": "operation fails after two consecutive socket timeouts - replaceOne on collection",
   483      "operations": [
   484        {
   485          "name": "failPoint",
   486          "object": "testRunner",
   487          "arguments": {
   488            "client": "failPointClient",
   489            "failPoint": {
   490              "configureFailPoint": "failCommand",
   491              "mode": {
   492                "times": 2
   493              },
   494              "data": {
   495                "failCommands": [
   496                  "update"
   497                ],
   498                "blockConnection": true,
   499                "blockTimeMS": 110
   500              }
   501            }
   502          }
   503        },
   504        {
   505          "name": "replaceOne",
   506          "object": "collection",
   507          "arguments": {
   508            "filter": {},
   509            "replacement": {
   510              "x": 1
   511            }
   512          },
   513          "expectError": {
   514            "isClientError": true
   515          }
   516        }
   517      ],
   518      "expectEvents": [
   519        {
   520          "client": "client",
   521          "events": [
   522            {
   523              "commandStartedEvent": {
   524                "commandName": "update",
   525                "databaseName": "test",
   526                "command": {
   527                  "update": "coll"
   528                }
   529              }
   530            },
   531            {
   532              "commandStartedEvent": {
   533                "commandName": "update",
   534                "databaseName": "test",
   535                "command": {
   536                  "update": "coll"
   537                }
   538              }
   539            }
   540          ]
   541        }
   542      ]
   543    },
   544    {
   545      "description": "operation succeeds after one socket timeout - updateOne on collection",
   546      "operations": [
   547        {
   548          "name": "failPoint",
   549          "object": "testRunner",
   550          "arguments": {
   551            "client": "failPointClient",
   552            "failPoint": {
   553              "configureFailPoint": "failCommand",
   554              "mode": {
   555                "times": 1
   556              },
   557              "data": {
   558                "failCommands": [
   559                  "update"
   560                ],
   561                "blockConnection": true,
   562                "blockTimeMS": 110
   563              }
   564            }
   565          }
   566        },
   567        {
   568          "name": "updateOne",
   569          "object": "collection",
   570          "arguments": {
   571            "filter": {},
   572            "update": {
   573              "$set": {
   574                "x": 1
   575              }
   576            }
   577          }
   578        }
   579      ],
   580      "expectEvents": [
   581        {
   582          "client": "client",
   583          "events": [
   584            {
   585              "commandStartedEvent": {
   586                "commandName": "update",
   587                "databaseName": "test",
   588                "command": {
   589                  "update": "coll"
   590                }
   591              }
   592            },
   593            {
   594              "commandStartedEvent": {
   595                "commandName": "update",
   596                "databaseName": "test",
   597                "command": {
   598                  "update": "coll"
   599                }
   600              }
   601            }
   602          ]
   603        }
   604      ]
   605    },
   606    {
   607      "description": "operation fails after two consecutive socket timeouts - updateOne on collection",
   608      "operations": [
   609        {
   610          "name": "failPoint",
   611          "object": "testRunner",
   612          "arguments": {
   613            "client": "failPointClient",
   614            "failPoint": {
   615              "configureFailPoint": "failCommand",
   616              "mode": {
   617                "times": 2
   618              },
   619              "data": {
   620                "failCommands": [
   621                  "update"
   622                ],
   623                "blockConnection": true,
   624                "blockTimeMS": 110
   625              }
   626            }
   627          }
   628        },
   629        {
   630          "name": "updateOne",
   631          "object": "collection",
   632          "arguments": {
   633            "filter": {},
   634            "update": {
   635              "$set": {
   636                "x": 1
   637              }
   638            }
   639          },
   640          "expectError": {
   641            "isClientError": true
   642          }
   643        }
   644      ],
   645      "expectEvents": [
   646        {
   647          "client": "client",
   648          "events": [
   649            {
   650              "commandStartedEvent": {
   651                "commandName": "update",
   652                "databaseName": "test",
   653                "command": {
   654                  "update": "coll"
   655                }
   656              }
   657            },
   658            {
   659              "commandStartedEvent": {
   660                "commandName": "update",
   661                "databaseName": "test",
   662                "command": {
   663                  "update": "coll"
   664                }
   665              }
   666            }
   667          ]
   668        }
   669      ]
   670    },
   671    {
   672      "description": "operation succeeds after one socket timeout - findOneAndDelete on collection",
   673      "operations": [
   674        {
   675          "name": "failPoint",
   676          "object": "testRunner",
   677          "arguments": {
   678            "client": "failPointClient",
   679            "failPoint": {
   680              "configureFailPoint": "failCommand",
   681              "mode": {
   682                "times": 1
   683              },
   684              "data": {
   685                "failCommands": [
   686                  "findAndModify"
   687                ],
   688                "blockConnection": true,
   689                "blockTimeMS": 110
   690              }
   691            }
   692          }
   693        },
   694        {
   695          "name": "findOneAndDelete",
   696          "object": "collection",
   697          "arguments": {
   698            "filter": {}
   699          }
   700        }
   701      ],
   702      "expectEvents": [
   703        {
   704          "client": "client",
   705          "events": [
   706            {
   707              "commandStartedEvent": {
   708                "commandName": "findAndModify",
   709                "databaseName": "test",
   710                "command": {
   711                  "findAndModify": "coll"
   712                }
   713              }
   714            },
   715            {
   716              "commandStartedEvent": {
   717                "commandName": "findAndModify",
   718                "databaseName": "test",
   719                "command": {
   720                  "findAndModify": "coll"
   721                }
   722              }
   723            }
   724          ]
   725        }
   726      ]
   727    },
   728    {
   729      "description": "operation fails after two consecutive socket timeouts - findOneAndDelete on collection",
   730      "operations": [
   731        {
   732          "name": "failPoint",
   733          "object": "testRunner",
   734          "arguments": {
   735            "client": "failPointClient",
   736            "failPoint": {
   737              "configureFailPoint": "failCommand",
   738              "mode": {
   739                "times": 2
   740              },
   741              "data": {
   742                "failCommands": [
   743                  "findAndModify"
   744                ],
   745                "blockConnection": true,
   746                "blockTimeMS": 110
   747              }
   748            }
   749          }
   750        },
   751        {
   752          "name": "findOneAndDelete",
   753          "object": "collection",
   754          "arguments": {
   755            "filter": {}
   756          },
   757          "expectError": {
   758            "isClientError": true
   759          }
   760        }
   761      ],
   762      "expectEvents": [
   763        {
   764          "client": "client",
   765          "events": [
   766            {
   767              "commandStartedEvent": {
   768                "commandName": "findAndModify",
   769                "databaseName": "test",
   770                "command": {
   771                  "findAndModify": "coll"
   772                }
   773              }
   774            },
   775            {
   776              "commandStartedEvent": {
   777                "commandName": "findAndModify",
   778                "databaseName": "test",
   779                "command": {
   780                  "findAndModify": "coll"
   781                }
   782              }
   783            }
   784          ]
   785        }
   786      ]
   787    },
   788    {
   789      "description": "operation succeeds after one socket timeout - findOneAndReplace on collection",
   790      "operations": [
   791        {
   792          "name": "failPoint",
   793          "object": "testRunner",
   794          "arguments": {
   795            "client": "failPointClient",
   796            "failPoint": {
   797              "configureFailPoint": "failCommand",
   798              "mode": {
   799                "times": 1
   800              },
   801              "data": {
   802                "failCommands": [
   803                  "findAndModify"
   804                ],
   805                "blockConnection": true,
   806                "blockTimeMS": 110
   807              }
   808            }
   809          }
   810        },
   811        {
   812          "name": "findOneAndReplace",
   813          "object": "collection",
   814          "arguments": {
   815            "filter": {},
   816            "replacement": {
   817              "x": 1
   818            }
   819          }
   820        }
   821      ],
   822      "expectEvents": [
   823        {
   824          "client": "client",
   825          "events": [
   826            {
   827              "commandStartedEvent": {
   828                "commandName": "findAndModify",
   829                "databaseName": "test",
   830                "command": {
   831                  "findAndModify": "coll"
   832                }
   833              }
   834            },
   835            {
   836              "commandStartedEvent": {
   837                "commandName": "findAndModify",
   838                "databaseName": "test",
   839                "command": {
   840                  "findAndModify": "coll"
   841                }
   842              }
   843            }
   844          ]
   845        }
   846      ]
   847    },
   848    {
   849      "description": "operation fails after two consecutive socket timeouts - findOneAndReplace on collection",
   850      "operations": [
   851        {
   852          "name": "failPoint",
   853          "object": "testRunner",
   854          "arguments": {
   855            "client": "failPointClient",
   856            "failPoint": {
   857              "configureFailPoint": "failCommand",
   858              "mode": {
   859                "times": 2
   860              },
   861              "data": {
   862                "failCommands": [
   863                  "findAndModify"
   864                ],
   865                "blockConnection": true,
   866                "blockTimeMS": 110
   867              }
   868            }
   869          }
   870        },
   871        {
   872          "name": "findOneAndReplace",
   873          "object": "collection",
   874          "arguments": {
   875            "filter": {},
   876            "replacement": {
   877              "x": 1
   878            }
   879          },
   880          "expectError": {
   881            "isClientError": true
   882          }
   883        }
   884      ],
   885      "expectEvents": [
   886        {
   887          "client": "client",
   888          "events": [
   889            {
   890              "commandStartedEvent": {
   891                "commandName": "findAndModify",
   892                "databaseName": "test",
   893                "command": {
   894                  "findAndModify": "coll"
   895                }
   896              }
   897            },
   898            {
   899              "commandStartedEvent": {
   900                "commandName": "findAndModify",
   901                "databaseName": "test",
   902                "command": {
   903                  "findAndModify": "coll"
   904                }
   905              }
   906            }
   907          ]
   908        }
   909      ]
   910    },
   911    {
   912      "description": "operation succeeds after one socket timeout - findOneAndUpdate on collection",
   913      "operations": [
   914        {
   915          "name": "failPoint",
   916          "object": "testRunner",
   917          "arguments": {
   918            "client": "failPointClient",
   919            "failPoint": {
   920              "configureFailPoint": "failCommand",
   921              "mode": {
   922                "times": 1
   923              },
   924              "data": {
   925                "failCommands": [
   926                  "findAndModify"
   927                ],
   928                "blockConnection": true,
   929                "blockTimeMS": 110
   930              }
   931            }
   932          }
   933        },
   934        {
   935          "name": "findOneAndUpdate",
   936          "object": "collection",
   937          "arguments": {
   938            "filter": {},
   939            "update": {
   940              "$set": {
   941                "x": 1
   942              }
   943            }
   944          }
   945        }
   946      ],
   947      "expectEvents": [
   948        {
   949          "client": "client",
   950          "events": [
   951            {
   952              "commandStartedEvent": {
   953                "commandName": "findAndModify",
   954                "databaseName": "test",
   955                "command": {
   956                  "findAndModify": "coll"
   957                }
   958              }
   959            },
   960            {
   961              "commandStartedEvent": {
   962                "commandName": "findAndModify",
   963                "databaseName": "test",
   964                "command": {
   965                  "findAndModify": "coll"
   966                }
   967              }
   968            }
   969          ]
   970        }
   971      ]
   972    },
   973    {
   974      "description": "operation fails after two consecutive socket timeouts - findOneAndUpdate on collection",
   975      "operations": [
   976        {
   977          "name": "failPoint",
   978          "object": "testRunner",
   979          "arguments": {
   980            "client": "failPointClient",
   981            "failPoint": {
   982              "configureFailPoint": "failCommand",
   983              "mode": {
   984                "times": 2
   985              },
   986              "data": {
   987                "failCommands": [
   988                  "findAndModify"
   989                ],
   990                "blockConnection": true,
   991                "blockTimeMS": 110
   992              }
   993            }
   994          }
   995        },
   996        {
   997          "name": "findOneAndUpdate",
   998          "object": "collection",
   999          "arguments": {
  1000            "filter": {},
  1001            "update": {
  1002              "$set": {
  1003                "x": 1
  1004              }
  1005            }
  1006          },
  1007          "expectError": {
  1008            "isClientError": true
  1009          }
  1010        }
  1011      ],
  1012      "expectEvents": [
  1013        {
  1014          "client": "client",
  1015          "events": [
  1016            {
  1017              "commandStartedEvent": {
  1018                "commandName": "findAndModify",
  1019                "databaseName": "test",
  1020                "command": {
  1021                  "findAndModify": "coll"
  1022                }
  1023              }
  1024            },
  1025            {
  1026              "commandStartedEvent": {
  1027                "commandName": "findAndModify",
  1028                "databaseName": "test",
  1029                "command": {
  1030                  "findAndModify": "coll"
  1031                }
  1032              }
  1033            }
  1034          ]
  1035        }
  1036      ]
  1037    },
  1038    {
  1039      "description": "operation succeeds after one socket timeout - bulkWrite on collection",
  1040      "operations": [
  1041        {
  1042          "name": "failPoint",
  1043          "object": "testRunner",
  1044          "arguments": {
  1045            "client": "failPointClient",
  1046            "failPoint": {
  1047              "configureFailPoint": "failCommand",
  1048              "mode": {
  1049                "times": 1
  1050              },
  1051              "data": {
  1052                "failCommands": [
  1053                  "insert"
  1054                ],
  1055                "blockConnection": true,
  1056                "blockTimeMS": 110
  1057              }
  1058            }
  1059          }
  1060        },
  1061        {
  1062          "name": "bulkWrite",
  1063          "object": "collection",
  1064          "arguments": {
  1065            "requests": [
  1066              {
  1067                "insertOne": {
  1068                  "document": {
  1069                    "_id": 1
  1070                  }
  1071                }
  1072              }
  1073            ]
  1074          }
  1075        }
  1076      ],
  1077      "expectEvents": [
  1078        {
  1079          "client": "client",
  1080          "events": [
  1081            {
  1082              "commandStartedEvent": {
  1083                "commandName": "insert",
  1084                "databaseName": "test",
  1085                "command": {
  1086                  "insert": "coll"
  1087                }
  1088              }
  1089            },
  1090            {
  1091              "commandStartedEvent": {
  1092                "commandName": "insert",
  1093                "databaseName": "test",
  1094                "command": {
  1095                  "insert": "coll"
  1096                }
  1097              }
  1098            }
  1099          ]
  1100        }
  1101      ]
  1102    },
  1103    {
  1104      "description": "operation fails after two consecutive socket timeouts - bulkWrite on collection",
  1105      "operations": [
  1106        {
  1107          "name": "failPoint",
  1108          "object": "testRunner",
  1109          "arguments": {
  1110            "client": "failPointClient",
  1111            "failPoint": {
  1112              "configureFailPoint": "failCommand",
  1113              "mode": {
  1114                "times": 2
  1115              },
  1116              "data": {
  1117                "failCommands": [
  1118                  "insert"
  1119                ],
  1120                "blockConnection": true,
  1121                "blockTimeMS": 110
  1122              }
  1123            }
  1124          }
  1125        },
  1126        {
  1127          "name": "bulkWrite",
  1128          "object": "collection",
  1129          "arguments": {
  1130            "requests": [
  1131              {
  1132                "insertOne": {
  1133                  "document": {
  1134                    "_id": 1
  1135                  }
  1136                }
  1137              }
  1138            ]
  1139          },
  1140          "expectError": {
  1141            "isClientError": true
  1142          }
  1143        }
  1144      ],
  1145      "expectEvents": [
  1146        {
  1147          "client": "client",
  1148          "events": [
  1149            {
  1150              "commandStartedEvent": {
  1151                "commandName": "insert",
  1152                "databaseName": "test",
  1153                "command": {
  1154                  "insert": "coll"
  1155                }
  1156              }
  1157            },
  1158            {
  1159              "commandStartedEvent": {
  1160                "commandName": "insert",
  1161                "databaseName": "test",
  1162                "command": {
  1163                  "insert": "coll"
  1164                }
  1165              }
  1166            }
  1167          ]
  1168        }
  1169      ]
  1170    },
  1171    {
  1172      "description": "operation succeeds after one socket timeout - listDatabases on client",
  1173      "operations": [
  1174        {
  1175          "name": "failPoint",
  1176          "object": "testRunner",
  1177          "arguments": {
  1178            "client": "failPointClient",
  1179            "failPoint": {
  1180              "configureFailPoint": "failCommand",
  1181              "mode": {
  1182                "times": 1
  1183              },
  1184              "data": {
  1185                "failCommands": [
  1186                  "listDatabases"
  1187                ],
  1188                "blockConnection": true,
  1189                "blockTimeMS": 110
  1190              }
  1191            }
  1192          }
  1193        },
  1194        {
  1195          "name": "listDatabases",
  1196          "object": "client",
  1197          "arguments": {
  1198            "filter": {}
  1199          }
  1200        }
  1201      ],
  1202      "expectEvents": [
  1203        {
  1204          "client": "client",
  1205          "events": [
  1206            {
  1207              "commandStartedEvent": {
  1208                "commandName": "listDatabases",
  1209                "databaseName": "admin",
  1210                "command": {
  1211                  "listDatabases": 1
  1212                }
  1213              }
  1214            },
  1215            {
  1216              "commandStartedEvent": {
  1217                "commandName": "listDatabases",
  1218                "databaseName": "admin",
  1219                "command": {
  1220                  "listDatabases": 1
  1221                }
  1222              }
  1223            }
  1224          ]
  1225        }
  1226      ]
  1227    },
  1228    {
  1229      "description": "operation fails after two consecutive socket timeouts - listDatabases on client",
  1230      "operations": [
  1231        {
  1232          "name": "failPoint",
  1233          "object": "testRunner",
  1234          "arguments": {
  1235            "client": "failPointClient",
  1236            "failPoint": {
  1237              "configureFailPoint": "failCommand",
  1238              "mode": {
  1239                "times": 2
  1240              },
  1241              "data": {
  1242                "failCommands": [
  1243                  "listDatabases"
  1244                ],
  1245                "blockConnection": true,
  1246                "blockTimeMS": 110
  1247              }
  1248            }
  1249          }
  1250        },
  1251        {
  1252          "name": "listDatabases",
  1253          "object": "client",
  1254          "arguments": {
  1255            "filter": {}
  1256          },
  1257          "expectError": {
  1258            "isClientError": true
  1259          }
  1260        }
  1261      ],
  1262      "expectEvents": [
  1263        {
  1264          "client": "client",
  1265          "events": [
  1266            {
  1267              "commandStartedEvent": {
  1268                "commandName": "listDatabases",
  1269                "databaseName": "admin",
  1270                "command": {
  1271                  "listDatabases": 1
  1272                }
  1273              }
  1274            },
  1275            {
  1276              "commandStartedEvent": {
  1277                "commandName": "listDatabases",
  1278                "databaseName": "admin",
  1279                "command": {
  1280                  "listDatabases": 1
  1281                }
  1282              }
  1283            }
  1284          ]
  1285        }
  1286      ]
  1287    },
  1288    {
  1289      "description": "operation succeeds after one socket timeout - listDatabaseNames on client",
  1290      "operations": [
  1291        {
  1292          "name": "failPoint",
  1293          "object": "testRunner",
  1294          "arguments": {
  1295            "client": "failPointClient",
  1296            "failPoint": {
  1297              "configureFailPoint": "failCommand",
  1298              "mode": {
  1299                "times": 1
  1300              },
  1301              "data": {
  1302                "failCommands": [
  1303                  "listDatabases"
  1304                ],
  1305                "blockConnection": true,
  1306                "blockTimeMS": 110
  1307              }
  1308            }
  1309          }
  1310        },
  1311        {
  1312          "name": "listDatabaseNames",
  1313          "object": "client"
  1314        }
  1315      ],
  1316      "expectEvents": [
  1317        {
  1318          "client": "client",
  1319          "events": [
  1320            {
  1321              "commandStartedEvent": {
  1322                "commandName": "listDatabases",
  1323                "databaseName": "admin",
  1324                "command": {
  1325                  "listDatabases": 1
  1326                }
  1327              }
  1328            },
  1329            {
  1330              "commandStartedEvent": {
  1331                "commandName": "listDatabases",
  1332                "databaseName": "admin",
  1333                "command": {
  1334                  "listDatabases": 1
  1335                }
  1336              }
  1337            }
  1338          ]
  1339        }
  1340      ]
  1341    },
  1342    {
  1343      "description": "operation fails after two consecutive socket timeouts - listDatabaseNames on client",
  1344      "operations": [
  1345        {
  1346          "name": "failPoint",
  1347          "object": "testRunner",
  1348          "arguments": {
  1349            "client": "failPointClient",
  1350            "failPoint": {
  1351              "configureFailPoint": "failCommand",
  1352              "mode": {
  1353                "times": 2
  1354              },
  1355              "data": {
  1356                "failCommands": [
  1357                  "listDatabases"
  1358                ],
  1359                "blockConnection": true,
  1360                "blockTimeMS": 110
  1361              }
  1362            }
  1363          }
  1364        },
  1365        {
  1366          "name": "listDatabaseNames",
  1367          "object": "client",
  1368          "expectError": {
  1369            "isClientError": true
  1370          }
  1371        }
  1372      ],
  1373      "expectEvents": [
  1374        {
  1375          "client": "client",
  1376          "events": [
  1377            {
  1378              "commandStartedEvent": {
  1379                "commandName": "listDatabases",
  1380                "databaseName": "admin",
  1381                "command": {
  1382                  "listDatabases": 1
  1383                }
  1384              }
  1385            },
  1386            {
  1387              "commandStartedEvent": {
  1388                "commandName": "listDatabases",
  1389                "databaseName": "admin",
  1390                "command": {
  1391                  "listDatabases": 1
  1392                }
  1393              }
  1394            }
  1395          ]
  1396        }
  1397      ]
  1398    },
  1399    {
  1400      "description": "operation succeeds after one socket timeout - createChangeStream on client",
  1401      "operations": [
  1402        {
  1403          "name": "failPoint",
  1404          "object": "testRunner",
  1405          "arguments": {
  1406            "client": "failPointClient",
  1407            "failPoint": {
  1408              "configureFailPoint": "failCommand",
  1409              "mode": {
  1410                "times": 1
  1411              },
  1412              "data": {
  1413                "failCommands": [
  1414                  "aggregate"
  1415                ],
  1416                "blockConnection": true,
  1417                "blockTimeMS": 110
  1418              }
  1419            }
  1420          }
  1421        },
  1422        {
  1423          "name": "createChangeStream",
  1424          "object": "client",
  1425          "arguments": {
  1426            "pipeline": []
  1427          }
  1428        }
  1429      ],
  1430      "expectEvents": [
  1431        {
  1432          "client": "client",
  1433          "events": [
  1434            {
  1435              "commandStartedEvent": {
  1436                "commandName": "aggregate",
  1437                "databaseName": "admin",
  1438                "command": {
  1439                  "aggregate": 1
  1440                }
  1441              }
  1442            },
  1443            {
  1444              "commandStartedEvent": {
  1445                "commandName": "aggregate",
  1446                "databaseName": "admin",
  1447                "command": {
  1448                  "aggregate": 1
  1449                }
  1450              }
  1451            }
  1452          ]
  1453        }
  1454      ]
  1455    },
  1456    {
  1457      "description": "operation fails after two consecutive socket timeouts - createChangeStream on client",
  1458      "operations": [
  1459        {
  1460          "name": "failPoint",
  1461          "object": "testRunner",
  1462          "arguments": {
  1463            "client": "failPointClient",
  1464            "failPoint": {
  1465              "configureFailPoint": "failCommand",
  1466              "mode": {
  1467                "times": 2
  1468              },
  1469              "data": {
  1470                "failCommands": [
  1471                  "aggregate"
  1472                ],
  1473                "blockConnection": true,
  1474                "blockTimeMS": 110
  1475              }
  1476            }
  1477          }
  1478        },
  1479        {
  1480          "name": "createChangeStream",
  1481          "object": "client",
  1482          "arguments": {
  1483            "pipeline": []
  1484          },
  1485          "expectError": {
  1486            "isClientError": true
  1487          }
  1488        }
  1489      ],
  1490      "expectEvents": [
  1491        {
  1492          "client": "client",
  1493          "events": [
  1494            {
  1495              "commandStartedEvent": {
  1496                "commandName": "aggregate",
  1497                "databaseName": "admin",
  1498                "command": {
  1499                  "aggregate": 1
  1500                }
  1501              }
  1502            },
  1503            {
  1504              "commandStartedEvent": {
  1505                "commandName": "aggregate",
  1506                "databaseName": "admin",
  1507                "command": {
  1508                  "aggregate": 1
  1509                }
  1510              }
  1511            }
  1512          ]
  1513        }
  1514      ]
  1515    },
  1516    {
  1517      "description": "operation succeeds after one socket timeout - aggregate on database",
  1518      "operations": [
  1519        {
  1520          "name": "failPoint",
  1521          "object": "testRunner",
  1522          "arguments": {
  1523            "client": "failPointClient",
  1524            "failPoint": {
  1525              "configureFailPoint": "failCommand",
  1526              "mode": {
  1527                "times": 1
  1528              },
  1529              "data": {
  1530                "failCommands": [
  1531                  "aggregate"
  1532                ],
  1533                "blockConnection": true,
  1534                "blockTimeMS": 110
  1535              }
  1536            }
  1537          }
  1538        },
  1539        {
  1540          "name": "aggregate",
  1541          "object": "database",
  1542          "arguments": {
  1543            "pipeline": [
  1544              {
  1545                "$listLocalSessions": {}
  1546              },
  1547              {
  1548                "$limit": 1
  1549              }
  1550            ]
  1551          }
  1552        }
  1553      ],
  1554      "expectEvents": [
  1555        {
  1556          "client": "client",
  1557          "events": [
  1558            {
  1559              "commandStartedEvent": {
  1560                "commandName": "aggregate",
  1561                "databaseName": "test",
  1562                "command": {
  1563                  "aggregate": 1
  1564                }
  1565              }
  1566            },
  1567            {
  1568              "commandStartedEvent": {
  1569                "commandName": "aggregate",
  1570                "databaseName": "test",
  1571                "command": {
  1572                  "aggregate": 1
  1573                }
  1574              }
  1575            }
  1576          ]
  1577        }
  1578      ]
  1579    },
  1580    {
  1581      "description": "operation fails after two consecutive socket timeouts - aggregate on database",
  1582      "operations": [
  1583        {
  1584          "name": "failPoint",
  1585          "object": "testRunner",
  1586          "arguments": {
  1587            "client": "failPointClient",
  1588            "failPoint": {
  1589              "configureFailPoint": "failCommand",
  1590              "mode": {
  1591                "times": 2
  1592              },
  1593              "data": {
  1594                "failCommands": [
  1595                  "aggregate"
  1596                ],
  1597                "blockConnection": true,
  1598                "blockTimeMS": 110
  1599              }
  1600            }
  1601          }
  1602        },
  1603        {
  1604          "name": "aggregate",
  1605          "object": "database",
  1606          "arguments": {
  1607            "pipeline": [
  1608              {
  1609                "$listLocalSessions": {}
  1610              },
  1611              {
  1612                "$limit": 1
  1613              }
  1614            ]
  1615          },
  1616          "expectError": {
  1617            "isClientError": true
  1618          }
  1619        }
  1620      ],
  1621      "expectEvents": [
  1622        {
  1623          "client": "client",
  1624          "events": [
  1625            {
  1626              "commandStartedEvent": {
  1627                "commandName": "aggregate",
  1628                "databaseName": "test",
  1629                "command": {
  1630                  "aggregate": 1
  1631                }
  1632              }
  1633            },
  1634            {
  1635              "commandStartedEvent": {
  1636                "commandName": "aggregate",
  1637                "databaseName": "test",
  1638                "command": {
  1639                  "aggregate": 1
  1640                }
  1641              }
  1642            }
  1643          ]
  1644        }
  1645      ]
  1646    },
  1647    {
  1648      "description": "operation succeeds after one socket timeout - listCollections on database",
  1649      "operations": [
  1650        {
  1651          "name": "failPoint",
  1652          "object": "testRunner",
  1653          "arguments": {
  1654            "client": "failPointClient",
  1655            "failPoint": {
  1656              "configureFailPoint": "failCommand",
  1657              "mode": {
  1658                "times": 1
  1659              },
  1660              "data": {
  1661                "failCommands": [
  1662                  "listCollections"
  1663                ],
  1664                "blockConnection": true,
  1665                "blockTimeMS": 110
  1666              }
  1667            }
  1668          }
  1669        },
  1670        {
  1671          "name": "listCollections",
  1672          "object": "database",
  1673          "arguments": {
  1674            "filter": {}
  1675          }
  1676        }
  1677      ],
  1678      "expectEvents": [
  1679        {
  1680          "client": "client",
  1681          "events": [
  1682            {
  1683              "commandStartedEvent": {
  1684                "commandName": "listCollections",
  1685                "databaseName": "test",
  1686                "command": {
  1687                  "listCollections": 1
  1688                }
  1689              }
  1690            },
  1691            {
  1692              "commandStartedEvent": {
  1693                "commandName": "listCollections",
  1694                "databaseName": "test",
  1695                "command": {
  1696                  "listCollections": 1
  1697                }
  1698              }
  1699            }
  1700          ]
  1701        }
  1702      ]
  1703    },
  1704    {
  1705      "description": "operation fails after two consecutive socket timeouts - listCollections on database",
  1706      "operations": [
  1707        {
  1708          "name": "failPoint",
  1709          "object": "testRunner",
  1710          "arguments": {
  1711            "client": "failPointClient",
  1712            "failPoint": {
  1713              "configureFailPoint": "failCommand",
  1714              "mode": {
  1715                "times": 2
  1716              },
  1717              "data": {
  1718                "failCommands": [
  1719                  "listCollections"
  1720                ],
  1721                "blockConnection": true,
  1722                "blockTimeMS": 110
  1723              }
  1724            }
  1725          }
  1726        },
  1727        {
  1728          "name": "listCollections",
  1729          "object": "database",
  1730          "arguments": {
  1731            "filter": {}
  1732          },
  1733          "expectError": {
  1734            "isClientError": true
  1735          }
  1736        }
  1737      ],
  1738      "expectEvents": [
  1739        {
  1740          "client": "client",
  1741          "events": [
  1742            {
  1743              "commandStartedEvent": {
  1744                "commandName": "listCollections",
  1745                "databaseName": "test",
  1746                "command": {
  1747                  "listCollections": 1
  1748                }
  1749              }
  1750            },
  1751            {
  1752              "commandStartedEvent": {
  1753                "commandName": "listCollections",
  1754                "databaseName": "test",
  1755                "command": {
  1756                  "listCollections": 1
  1757                }
  1758              }
  1759            }
  1760          ]
  1761        }
  1762      ]
  1763    },
  1764    {
  1765      "description": "operation succeeds after one socket timeout - listCollectionNames on database",
  1766      "operations": [
  1767        {
  1768          "name": "failPoint",
  1769          "object": "testRunner",
  1770          "arguments": {
  1771            "client": "failPointClient",
  1772            "failPoint": {
  1773              "configureFailPoint": "failCommand",
  1774              "mode": {
  1775                "times": 1
  1776              },
  1777              "data": {
  1778                "failCommands": [
  1779                  "listCollections"
  1780                ],
  1781                "blockConnection": true,
  1782                "blockTimeMS": 110
  1783              }
  1784            }
  1785          }
  1786        },
  1787        {
  1788          "name": "listCollectionNames",
  1789          "object": "database",
  1790          "arguments": {
  1791            "filter": {}
  1792          }
  1793        }
  1794      ],
  1795      "expectEvents": [
  1796        {
  1797          "client": "client",
  1798          "events": [
  1799            {
  1800              "commandStartedEvent": {
  1801                "commandName": "listCollections",
  1802                "databaseName": "test",
  1803                "command": {
  1804                  "listCollections": 1
  1805                }
  1806              }
  1807            },
  1808            {
  1809              "commandStartedEvent": {
  1810                "commandName": "listCollections",
  1811                "databaseName": "test",
  1812                "command": {
  1813                  "listCollections": 1
  1814                }
  1815              }
  1816            }
  1817          ]
  1818        }
  1819      ]
  1820    },
  1821    {
  1822      "description": "operation fails after two consecutive socket timeouts - listCollectionNames on database",
  1823      "operations": [
  1824        {
  1825          "name": "failPoint",
  1826          "object": "testRunner",
  1827          "arguments": {
  1828            "client": "failPointClient",
  1829            "failPoint": {
  1830              "configureFailPoint": "failCommand",
  1831              "mode": {
  1832                "times": 2
  1833              },
  1834              "data": {
  1835                "failCommands": [
  1836                  "listCollections"
  1837                ],
  1838                "blockConnection": true,
  1839                "blockTimeMS": 110
  1840              }
  1841            }
  1842          }
  1843        },
  1844        {
  1845          "name": "listCollectionNames",
  1846          "object": "database",
  1847          "arguments": {
  1848            "filter": {}
  1849          },
  1850          "expectError": {
  1851            "isClientError": true
  1852          }
  1853        }
  1854      ],
  1855      "expectEvents": [
  1856        {
  1857          "client": "client",
  1858          "events": [
  1859            {
  1860              "commandStartedEvent": {
  1861                "commandName": "listCollections",
  1862                "databaseName": "test",
  1863                "command": {
  1864                  "listCollections": 1
  1865                }
  1866              }
  1867            },
  1868            {
  1869              "commandStartedEvent": {
  1870                "commandName": "listCollections",
  1871                "databaseName": "test",
  1872                "command": {
  1873                  "listCollections": 1
  1874                }
  1875              }
  1876            }
  1877          ]
  1878        }
  1879      ]
  1880    },
  1881    {
  1882      "description": "operation succeeds after one socket timeout - createChangeStream on database",
  1883      "operations": [
  1884        {
  1885          "name": "failPoint",
  1886          "object": "testRunner",
  1887          "arguments": {
  1888            "client": "failPointClient",
  1889            "failPoint": {
  1890              "configureFailPoint": "failCommand",
  1891              "mode": {
  1892                "times": 1
  1893              },
  1894              "data": {
  1895                "failCommands": [
  1896                  "aggregate"
  1897                ],
  1898                "blockConnection": true,
  1899                "blockTimeMS": 110
  1900              }
  1901            }
  1902          }
  1903        },
  1904        {
  1905          "name": "createChangeStream",
  1906          "object": "database",
  1907          "arguments": {
  1908            "pipeline": []
  1909          }
  1910        }
  1911      ],
  1912      "expectEvents": [
  1913        {
  1914          "client": "client",
  1915          "events": [
  1916            {
  1917              "commandStartedEvent": {
  1918                "commandName": "aggregate",
  1919                "databaseName": "test",
  1920                "command": {
  1921                  "aggregate": 1
  1922                }
  1923              }
  1924            },
  1925            {
  1926              "commandStartedEvent": {
  1927                "commandName": "aggregate",
  1928                "databaseName": "test",
  1929                "command": {
  1930                  "aggregate": 1
  1931                }
  1932              }
  1933            }
  1934          ]
  1935        }
  1936      ]
  1937    },
  1938    {
  1939      "description": "operation fails after two consecutive socket timeouts - createChangeStream on database",
  1940      "operations": [
  1941        {
  1942          "name": "failPoint",
  1943          "object": "testRunner",
  1944          "arguments": {
  1945            "client": "failPointClient",
  1946            "failPoint": {
  1947              "configureFailPoint": "failCommand",
  1948              "mode": {
  1949                "times": 2
  1950              },
  1951              "data": {
  1952                "failCommands": [
  1953                  "aggregate"
  1954                ],
  1955                "blockConnection": true,
  1956                "blockTimeMS": 110
  1957              }
  1958            }
  1959          }
  1960        },
  1961        {
  1962          "name": "createChangeStream",
  1963          "object": "database",
  1964          "arguments": {
  1965            "pipeline": []
  1966          },
  1967          "expectError": {
  1968            "isClientError": true
  1969          }
  1970        }
  1971      ],
  1972      "expectEvents": [
  1973        {
  1974          "client": "client",
  1975          "events": [
  1976            {
  1977              "commandStartedEvent": {
  1978                "commandName": "aggregate",
  1979                "databaseName": "test",
  1980                "command": {
  1981                  "aggregate": 1
  1982                }
  1983              }
  1984            },
  1985            {
  1986              "commandStartedEvent": {
  1987                "commandName": "aggregate",
  1988                "databaseName": "test",
  1989                "command": {
  1990                  "aggregate": 1
  1991                }
  1992              }
  1993            }
  1994          ]
  1995        }
  1996      ]
  1997    },
  1998    {
  1999      "description": "operation succeeds after one socket timeout - aggregate on collection",
  2000      "operations": [
  2001        {
  2002          "name": "failPoint",
  2003          "object": "testRunner",
  2004          "arguments": {
  2005            "client": "failPointClient",
  2006            "failPoint": {
  2007              "configureFailPoint": "failCommand",
  2008              "mode": {
  2009                "times": 1
  2010              },
  2011              "data": {
  2012                "failCommands": [
  2013                  "aggregate"
  2014                ],
  2015                "blockConnection": true,
  2016                "blockTimeMS": 110
  2017              }
  2018            }
  2019          }
  2020        },
  2021        {
  2022          "name": "aggregate",
  2023          "object": "collection",
  2024          "arguments": {
  2025            "pipeline": []
  2026          }
  2027        }
  2028      ],
  2029      "expectEvents": [
  2030        {
  2031          "client": "client",
  2032          "events": [
  2033            {
  2034              "commandStartedEvent": {
  2035                "commandName": "aggregate",
  2036                "databaseName": "test",
  2037                "command": {
  2038                  "aggregate": "coll"
  2039                }
  2040              }
  2041            },
  2042            {
  2043              "commandStartedEvent": {
  2044                "commandName": "aggregate",
  2045                "databaseName": "test",
  2046                "command": {
  2047                  "aggregate": "coll"
  2048                }
  2049              }
  2050            }
  2051          ]
  2052        }
  2053      ]
  2054    },
  2055    {
  2056      "description": "operation fails after two consecutive socket timeouts - aggregate on collection",
  2057      "operations": [
  2058        {
  2059          "name": "failPoint",
  2060          "object": "testRunner",
  2061          "arguments": {
  2062            "client": "failPointClient",
  2063            "failPoint": {
  2064              "configureFailPoint": "failCommand",
  2065              "mode": {
  2066                "times": 2
  2067              },
  2068              "data": {
  2069                "failCommands": [
  2070                  "aggregate"
  2071                ],
  2072                "blockConnection": true,
  2073                "blockTimeMS": 110
  2074              }
  2075            }
  2076          }
  2077        },
  2078        {
  2079          "name": "aggregate",
  2080          "object": "collection",
  2081          "arguments": {
  2082            "pipeline": []
  2083          },
  2084          "expectError": {
  2085            "isClientError": true
  2086          }
  2087        }
  2088      ],
  2089      "expectEvents": [
  2090        {
  2091          "client": "client",
  2092          "events": [
  2093            {
  2094              "commandStartedEvent": {
  2095                "commandName": "aggregate",
  2096                "databaseName": "test",
  2097                "command": {
  2098                  "aggregate": "coll"
  2099                }
  2100              }
  2101            },
  2102            {
  2103              "commandStartedEvent": {
  2104                "commandName": "aggregate",
  2105                "databaseName": "test",
  2106                "command": {
  2107                  "aggregate": "coll"
  2108                }
  2109              }
  2110            }
  2111          ]
  2112        }
  2113      ]
  2114    },
  2115    {
  2116      "description": "operation succeeds after one socket timeout - count on collection",
  2117      "operations": [
  2118        {
  2119          "name": "failPoint",
  2120          "object": "testRunner",
  2121          "arguments": {
  2122            "client": "failPointClient",
  2123            "failPoint": {
  2124              "configureFailPoint": "failCommand",
  2125              "mode": {
  2126                "times": 1
  2127              },
  2128              "data": {
  2129                "failCommands": [
  2130                  "count"
  2131                ],
  2132                "blockConnection": true,
  2133                "blockTimeMS": 110
  2134              }
  2135            }
  2136          }
  2137        },
  2138        {
  2139          "name": "count",
  2140          "object": "collection",
  2141          "arguments": {
  2142            "filter": {}
  2143          }
  2144        }
  2145      ],
  2146      "expectEvents": [
  2147        {
  2148          "client": "client",
  2149          "events": [
  2150            {
  2151              "commandStartedEvent": {
  2152                "commandName": "count",
  2153                "databaseName": "test",
  2154                "command": {
  2155                  "count": "coll"
  2156                }
  2157              }
  2158            },
  2159            {
  2160              "commandStartedEvent": {
  2161                "commandName": "count",
  2162                "databaseName": "test",
  2163                "command": {
  2164                  "count": "coll"
  2165                }
  2166              }
  2167            }
  2168          ]
  2169        }
  2170      ]
  2171    },
  2172    {
  2173      "description": "operation fails after two consecutive socket timeouts - count on collection",
  2174      "operations": [
  2175        {
  2176          "name": "failPoint",
  2177          "object": "testRunner",
  2178          "arguments": {
  2179            "client": "failPointClient",
  2180            "failPoint": {
  2181              "configureFailPoint": "failCommand",
  2182              "mode": {
  2183                "times": 2
  2184              },
  2185              "data": {
  2186                "failCommands": [
  2187                  "count"
  2188                ],
  2189                "blockConnection": true,
  2190                "blockTimeMS": 110
  2191              }
  2192            }
  2193          }
  2194        },
  2195        {
  2196          "name": "count",
  2197          "object": "collection",
  2198          "arguments": {
  2199            "filter": {}
  2200          },
  2201          "expectError": {
  2202            "isClientError": true
  2203          }
  2204        }
  2205      ],
  2206      "expectEvents": [
  2207        {
  2208          "client": "client",
  2209          "events": [
  2210            {
  2211              "commandStartedEvent": {
  2212                "commandName": "count",
  2213                "databaseName": "test",
  2214                "command": {
  2215                  "count": "coll"
  2216                }
  2217              }
  2218            },
  2219            {
  2220              "commandStartedEvent": {
  2221                "commandName": "count",
  2222                "databaseName": "test",
  2223                "command": {
  2224                  "count": "coll"
  2225                }
  2226              }
  2227            }
  2228          ]
  2229        }
  2230      ]
  2231    },
  2232    {
  2233      "description": "operation succeeds after one socket timeout - countDocuments on collection",
  2234      "operations": [
  2235        {
  2236          "name": "failPoint",
  2237          "object": "testRunner",
  2238          "arguments": {
  2239            "client": "failPointClient",
  2240            "failPoint": {
  2241              "configureFailPoint": "failCommand",
  2242              "mode": {
  2243                "times": 1
  2244              },
  2245              "data": {
  2246                "failCommands": [
  2247                  "aggregate"
  2248                ],
  2249                "blockConnection": true,
  2250                "blockTimeMS": 110
  2251              }
  2252            }
  2253          }
  2254        },
  2255        {
  2256          "name": "countDocuments",
  2257          "object": "collection",
  2258          "arguments": {
  2259            "filter": {}
  2260          }
  2261        }
  2262      ],
  2263      "expectEvents": [
  2264        {
  2265          "client": "client",
  2266          "events": [
  2267            {
  2268              "commandStartedEvent": {
  2269                "commandName": "aggregate",
  2270                "databaseName": "test",
  2271                "command": {
  2272                  "aggregate": "coll"
  2273                }
  2274              }
  2275            },
  2276            {
  2277              "commandStartedEvent": {
  2278                "commandName": "aggregate",
  2279                "databaseName": "test",
  2280                "command": {
  2281                  "aggregate": "coll"
  2282                }
  2283              }
  2284            }
  2285          ]
  2286        }
  2287      ]
  2288    },
  2289    {
  2290      "description": "operation fails after two consecutive socket timeouts - countDocuments on collection",
  2291      "operations": [
  2292        {
  2293          "name": "failPoint",
  2294          "object": "testRunner",
  2295          "arguments": {
  2296            "client": "failPointClient",
  2297            "failPoint": {
  2298              "configureFailPoint": "failCommand",
  2299              "mode": {
  2300                "times": 2
  2301              },
  2302              "data": {
  2303                "failCommands": [
  2304                  "aggregate"
  2305                ],
  2306                "blockConnection": true,
  2307                "blockTimeMS": 110
  2308              }
  2309            }
  2310          }
  2311        },
  2312        {
  2313          "name": "countDocuments",
  2314          "object": "collection",
  2315          "arguments": {
  2316            "filter": {}
  2317          },
  2318          "expectError": {
  2319            "isClientError": true
  2320          }
  2321        }
  2322      ],
  2323      "expectEvents": [
  2324        {
  2325          "client": "client",
  2326          "events": [
  2327            {
  2328              "commandStartedEvent": {
  2329                "commandName": "aggregate",
  2330                "databaseName": "test",
  2331                "command": {
  2332                  "aggregate": "coll"
  2333                }
  2334              }
  2335            },
  2336            {
  2337              "commandStartedEvent": {
  2338                "commandName": "aggregate",
  2339                "databaseName": "test",
  2340                "command": {
  2341                  "aggregate": "coll"
  2342                }
  2343              }
  2344            }
  2345          ]
  2346        }
  2347      ]
  2348    },
  2349    {
  2350      "description": "operation succeeds after one socket timeout - estimatedDocumentCount on collection",
  2351      "operations": [
  2352        {
  2353          "name": "failPoint",
  2354          "object": "testRunner",
  2355          "arguments": {
  2356            "client": "failPointClient",
  2357            "failPoint": {
  2358              "configureFailPoint": "failCommand",
  2359              "mode": {
  2360                "times": 1
  2361              },
  2362              "data": {
  2363                "failCommands": [
  2364                  "count"
  2365                ],
  2366                "blockConnection": true,
  2367                "blockTimeMS": 110
  2368              }
  2369            }
  2370          }
  2371        },
  2372        {
  2373          "name": "estimatedDocumentCount",
  2374          "object": "collection"
  2375        }
  2376      ],
  2377      "expectEvents": [
  2378        {
  2379          "client": "client",
  2380          "events": [
  2381            {
  2382              "commandStartedEvent": {
  2383                "commandName": "count",
  2384                "databaseName": "test",
  2385                "command": {
  2386                  "count": "coll"
  2387                }
  2388              }
  2389            },
  2390            {
  2391              "commandStartedEvent": {
  2392                "commandName": "count",
  2393                "databaseName": "test",
  2394                "command": {
  2395                  "count": "coll"
  2396                }
  2397              }
  2398            }
  2399          ]
  2400        }
  2401      ]
  2402    },
  2403    {
  2404      "description": "operation fails after two consecutive socket timeouts - estimatedDocumentCount on collection",
  2405      "operations": [
  2406        {
  2407          "name": "failPoint",
  2408          "object": "testRunner",
  2409          "arguments": {
  2410            "client": "failPointClient",
  2411            "failPoint": {
  2412              "configureFailPoint": "failCommand",
  2413              "mode": {
  2414                "times": 2
  2415              },
  2416              "data": {
  2417                "failCommands": [
  2418                  "count"
  2419                ],
  2420                "blockConnection": true,
  2421                "blockTimeMS": 110
  2422              }
  2423            }
  2424          }
  2425        },
  2426        {
  2427          "name": "estimatedDocumentCount",
  2428          "object": "collection",
  2429          "expectError": {
  2430            "isClientError": true
  2431          }
  2432        }
  2433      ],
  2434      "expectEvents": [
  2435        {
  2436          "client": "client",
  2437          "events": [
  2438            {
  2439              "commandStartedEvent": {
  2440                "commandName": "count",
  2441                "databaseName": "test",
  2442                "command": {
  2443                  "count": "coll"
  2444                }
  2445              }
  2446            },
  2447            {
  2448              "commandStartedEvent": {
  2449                "commandName": "count",
  2450                "databaseName": "test",
  2451                "command": {
  2452                  "count": "coll"
  2453                }
  2454              }
  2455            }
  2456          ]
  2457        }
  2458      ]
  2459    },
  2460    {
  2461      "description": "operation succeeds after one socket timeout - distinct on collection",
  2462      "operations": [
  2463        {
  2464          "name": "failPoint",
  2465          "object": "testRunner",
  2466          "arguments": {
  2467            "client": "failPointClient",
  2468            "failPoint": {
  2469              "configureFailPoint": "failCommand",
  2470              "mode": {
  2471                "times": 1
  2472              },
  2473              "data": {
  2474                "failCommands": [
  2475                  "distinct"
  2476                ],
  2477                "blockConnection": true,
  2478                "blockTimeMS": 110
  2479              }
  2480            }
  2481          }
  2482        },
  2483        {
  2484          "name": "distinct",
  2485          "object": "collection",
  2486          "arguments": {
  2487            "fieldName": "x",
  2488            "filter": {}
  2489          }
  2490        }
  2491      ],
  2492      "expectEvents": [
  2493        {
  2494          "client": "client",
  2495          "events": [
  2496            {
  2497              "commandStartedEvent": {
  2498                "commandName": "distinct",
  2499                "databaseName": "test",
  2500                "command": {
  2501                  "distinct": "coll"
  2502                }
  2503              }
  2504            },
  2505            {
  2506              "commandStartedEvent": {
  2507                "commandName": "distinct",
  2508                "databaseName": "test",
  2509                "command": {
  2510                  "distinct": "coll"
  2511                }
  2512              }
  2513            }
  2514          ]
  2515        }
  2516      ]
  2517    },
  2518    {
  2519      "description": "operation fails after two consecutive socket timeouts - distinct on collection",
  2520      "operations": [
  2521        {
  2522          "name": "failPoint",
  2523          "object": "testRunner",
  2524          "arguments": {
  2525            "client": "failPointClient",
  2526            "failPoint": {
  2527              "configureFailPoint": "failCommand",
  2528              "mode": {
  2529                "times": 2
  2530              },
  2531              "data": {
  2532                "failCommands": [
  2533                  "distinct"
  2534                ],
  2535                "blockConnection": true,
  2536                "blockTimeMS": 110
  2537              }
  2538            }
  2539          }
  2540        },
  2541        {
  2542          "name": "distinct",
  2543          "object": "collection",
  2544          "arguments": {
  2545            "fieldName": "x",
  2546            "filter": {}
  2547          },
  2548          "expectError": {
  2549            "isClientError": true
  2550          }
  2551        }
  2552      ],
  2553      "expectEvents": [
  2554        {
  2555          "client": "client",
  2556          "events": [
  2557            {
  2558              "commandStartedEvent": {
  2559                "commandName": "distinct",
  2560                "databaseName": "test",
  2561                "command": {
  2562                  "distinct": "coll"
  2563                }
  2564              }
  2565            },
  2566            {
  2567              "commandStartedEvent": {
  2568                "commandName": "distinct",
  2569                "databaseName": "test",
  2570                "command": {
  2571                  "distinct": "coll"
  2572                }
  2573              }
  2574            }
  2575          ]
  2576        }
  2577      ]
  2578    },
  2579    {
  2580      "description": "operation succeeds after one socket timeout - find on collection",
  2581      "operations": [
  2582        {
  2583          "name": "failPoint",
  2584          "object": "testRunner",
  2585          "arguments": {
  2586            "client": "failPointClient",
  2587            "failPoint": {
  2588              "configureFailPoint": "failCommand",
  2589              "mode": {
  2590                "times": 1
  2591              },
  2592              "data": {
  2593                "failCommands": [
  2594                  "find"
  2595                ],
  2596                "blockConnection": true,
  2597                "blockTimeMS": 110
  2598              }
  2599            }
  2600          }
  2601        },
  2602        {
  2603          "name": "find",
  2604          "object": "collection",
  2605          "arguments": {
  2606            "filter": {}
  2607          }
  2608        }
  2609      ],
  2610      "expectEvents": [
  2611        {
  2612          "client": "client",
  2613          "events": [
  2614            {
  2615              "commandStartedEvent": {
  2616                "commandName": "find",
  2617                "databaseName": "test",
  2618                "command": {
  2619                  "find": "coll"
  2620                }
  2621              }
  2622            },
  2623            {
  2624              "commandStartedEvent": {
  2625                "commandName": "find",
  2626                "databaseName": "test",
  2627                "command": {
  2628                  "find": "coll"
  2629                }
  2630              }
  2631            }
  2632          ]
  2633        }
  2634      ]
  2635    },
  2636    {
  2637      "description": "operation fails after two consecutive socket timeouts - find on collection",
  2638      "operations": [
  2639        {
  2640          "name": "failPoint",
  2641          "object": "testRunner",
  2642          "arguments": {
  2643            "client": "failPointClient",
  2644            "failPoint": {
  2645              "configureFailPoint": "failCommand",
  2646              "mode": {
  2647                "times": 2
  2648              },
  2649              "data": {
  2650                "failCommands": [
  2651                  "find"
  2652                ],
  2653                "blockConnection": true,
  2654                "blockTimeMS": 110
  2655              }
  2656            }
  2657          }
  2658        },
  2659        {
  2660          "name": "find",
  2661          "object": "collection",
  2662          "arguments": {
  2663            "filter": {}
  2664          },
  2665          "expectError": {
  2666            "isClientError": true
  2667          }
  2668        }
  2669      ],
  2670      "expectEvents": [
  2671        {
  2672          "client": "client",
  2673          "events": [
  2674            {
  2675              "commandStartedEvent": {
  2676                "commandName": "find",
  2677                "databaseName": "test",
  2678                "command": {
  2679                  "find": "coll"
  2680                }
  2681              }
  2682            },
  2683            {
  2684              "commandStartedEvent": {
  2685                "commandName": "find",
  2686                "databaseName": "test",
  2687                "command": {
  2688                  "find": "coll"
  2689                }
  2690              }
  2691            }
  2692          ]
  2693        }
  2694      ]
  2695    },
  2696    {
  2697      "description": "operation succeeds after one socket timeout - findOne on collection",
  2698      "operations": [
  2699        {
  2700          "name": "failPoint",
  2701          "object": "testRunner",
  2702          "arguments": {
  2703            "client": "failPointClient",
  2704            "failPoint": {
  2705              "configureFailPoint": "failCommand",
  2706              "mode": {
  2707                "times": 1
  2708              },
  2709              "data": {
  2710                "failCommands": [
  2711                  "find"
  2712                ],
  2713                "blockConnection": true,
  2714                "blockTimeMS": 110
  2715              }
  2716            }
  2717          }
  2718        },
  2719        {
  2720          "name": "findOne",
  2721          "object": "collection",
  2722          "arguments": {
  2723            "filter": {}
  2724          }
  2725        }
  2726      ],
  2727      "expectEvents": [
  2728        {
  2729          "client": "client",
  2730          "events": [
  2731            {
  2732              "commandStartedEvent": {
  2733                "commandName": "find",
  2734                "databaseName": "test",
  2735                "command": {
  2736                  "find": "coll"
  2737                }
  2738              }
  2739            },
  2740            {
  2741              "commandStartedEvent": {
  2742                "commandName": "find",
  2743                "databaseName": "test",
  2744                "command": {
  2745                  "find": "coll"
  2746                }
  2747              }
  2748            }
  2749          ]
  2750        }
  2751      ]
  2752    },
  2753    {
  2754      "description": "operation fails after two consecutive socket timeouts - findOne on collection",
  2755      "operations": [
  2756        {
  2757          "name": "failPoint",
  2758          "object": "testRunner",
  2759          "arguments": {
  2760            "client": "failPointClient",
  2761            "failPoint": {
  2762              "configureFailPoint": "failCommand",
  2763              "mode": {
  2764                "times": 2
  2765              },
  2766              "data": {
  2767                "failCommands": [
  2768                  "find"
  2769                ],
  2770                "blockConnection": true,
  2771                "blockTimeMS": 110
  2772              }
  2773            }
  2774          }
  2775        },
  2776        {
  2777          "name": "findOne",
  2778          "object": "collection",
  2779          "arguments": {
  2780            "filter": {}
  2781          },
  2782          "expectError": {
  2783            "isClientError": true
  2784          }
  2785        }
  2786      ],
  2787      "expectEvents": [
  2788        {
  2789          "client": "client",
  2790          "events": [
  2791            {
  2792              "commandStartedEvent": {
  2793                "commandName": "find",
  2794                "databaseName": "test",
  2795                "command": {
  2796                  "find": "coll"
  2797                }
  2798              }
  2799            },
  2800            {
  2801              "commandStartedEvent": {
  2802                "commandName": "find",
  2803                "databaseName": "test",
  2804                "command": {
  2805                  "find": "coll"
  2806                }
  2807              }
  2808            }
  2809          ]
  2810        }
  2811      ]
  2812    },
  2813    {
  2814      "description": "operation succeeds after one socket timeout - listIndexes on collection",
  2815      "operations": [
  2816        {
  2817          "name": "failPoint",
  2818          "object": "testRunner",
  2819          "arguments": {
  2820            "client": "failPointClient",
  2821            "failPoint": {
  2822              "configureFailPoint": "failCommand",
  2823              "mode": {
  2824                "times": 1
  2825              },
  2826              "data": {
  2827                "failCommands": [
  2828                  "listIndexes"
  2829                ],
  2830                "blockConnection": true,
  2831                "blockTimeMS": 110
  2832              }
  2833            }
  2834          }
  2835        },
  2836        {
  2837          "name": "listIndexes",
  2838          "object": "collection"
  2839        }
  2840      ],
  2841      "expectEvents": [
  2842        {
  2843          "client": "client",
  2844          "events": [
  2845            {
  2846              "commandStartedEvent": {
  2847                "commandName": "listIndexes",
  2848                "databaseName": "test",
  2849                "command": {
  2850                  "listIndexes": "coll"
  2851                }
  2852              }
  2853            },
  2854            {
  2855              "commandStartedEvent": {
  2856                "commandName": "listIndexes",
  2857                "databaseName": "test",
  2858                "command": {
  2859                  "listIndexes": "coll"
  2860                }
  2861              }
  2862            }
  2863          ]
  2864        }
  2865      ]
  2866    },
  2867    {
  2868      "description": "operation fails after two consecutive socket timeouts - listIndexes on collection",
  2869      "operations": [
  2870        {
  2871          "name": "failPoint",
  2872          "object": "testRunner",
  2873          "arguments": {
  2874            "client": "failPointClient",
  2875            "failPoint": {
  2876              "configureFailPoint": "failCommand",
  2877              "mode": {
  2878                "times": 2
  2879              },
  2880              "data": {
  2881                "failCommands": [
  2882                  "listIndexes"
  2883                ],
  2884                "blockConnection": true,
  2885                "blockTimeMS": 110
  2886              }
  2887            }
  2888          }
  2889        },
  2890        {
  2891          "name": "listIndexes",
  2892          "object": "collection",
  2893          "expectError": {
  2894            "isClientError": true
  2895          }
  2896        }
  2897      ],
  2898      "expectEvents": [
  2899        {
  2900          "client": "client",
  2901          "events": [
  2902            {
  2903              "commandStartedEvent": {
  2904                "commandName": "listIndexes",
  2905                "databaseName": "test",
  2906                "command": {
  2907                  "listIndexes": "coll"
  2908                }
  2909              }
  2910            },
  2911            {
  2912              "commandStartedEvent": {
  2913                "commandName": "listIndexes",
  2914                "databaseName": "test",
  2915                "command": {
  2916                  "listIndexes": "coll"
  2917                }
  2918              }
  2919            }
  2920          ]
  2921        }
  2922      ]
  2923    },
  2924    {
  2925      "description": "operation succeeds after one socket timeout - createChangeStream on collection",
  2926      "operations": [
  2927        {
  2928          "name": "failPoint",
  2929          "object": "testRunner",
  2930          "arguments": {
  2931            "client": "failPointClient",
  2932            "failPoint": {
  2933              "configureFailPoint": "failCommand",
  2934              "mode": {
  2935                "times": 1
  2936              },
  2937              "data": {
  2938                "failCommands": [
  2939                  "aggregate"
  2940                ],
  2941                "blockConnection": true,
  2942                "blockTimeMS": 110
  2943              }
  2944            }
  2945          }
  2946        },
  2947        {
  2948          "name": "createChangeStream",
  2949          "object": "collection",
  2950          "arguments": {
  2951            "pipeline": []
  2952          }
  2953        }
  2954      ],
  2955      "expectEvents": [
  2956        {
  2957          "client": "client",
  2958          "events": [
  2959            {
  2960              "commandStartedEvent": {
  2961                "commandName": "aggregate",
  2962                "databaseName": "test",
  2963                "command": {
  2964                  "aggregate": "coll"
  2965                }
  2966              }
  2967            },
  2968            {
  2969              "commandStartedEvent": {
  2970                "commandName": "aggregate",
  2971                "databaseName": "test",
  2972                "command": {
  2973                  "aggregate": "coll"
  2974                }
  2975              }
  2976            }
  2977          ]
  2978        }
  2979      ]
  2980    },
  2981    {
  2982      "description": "operation fails after two consecutive socket timeouts - createChangeStream on collection",
  2983      "operations": [
  2984        {
  2985          "name": "failPoint",
  2986          "object": "testRunner",
  2987          "arguments": {
  2988            "client": "failPointClient",
  2989            "failPoint": {
  2990              "configureFailPoint": "failCommand",
  2991              "mode": {
  2992                "times": 2
  2993              },
  2994              "data": {
  2995                "failCommands": [
  2996                  "aggregate"
  2997                ],
  2998                "blockConnection": true,
  2999                "blockTimeMS": 110
  3000              }
  3001            }
  3002          }
  3003        },
  3004        {
  3005          "name": "createChangeStream",
  3006          "object": "collection",
  3007          "arguments": {
  3008            "pipeline": []
  3009          },
  3010          "expectError": {
  3011            "isClientError": true
  3012          }
  3013        }
  3014      ],
  3015      "expectEvents": [
  3016        {
  3017          "client": "client",
  3018          "events": [
  3019            {
  3020              "commandStartedEvent": {
  3021                "commandName": "aggregate",
  3022                "databaseName": "test",
  3023                "command": {
  3024                  "aggregate": "coll"
  3025                }
  3026              }
  3027            },
  3028            {
  3029              "commandStartedEvent": {
  3030                "commandName": "aggregate",
  3031                "databaseName": "test",
  3032                "command": {
  3033                  "aggregate": "coll"
  3034                }
  3035              }
  3036            }
  3037          ]
  3038        }
  3039      ]
  3040    }
  3041  ]
  3042}

View as plain text