...

Text file src/go.mongodb.org/mongo-driver/testdata/client-side-operations-timeout/global-timeoutMS.json

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

     1{
     2  "description": "timeoutMS can be configured on a MongoClient",
     3  "schemaVersion": "1.5",
     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  "initialData": [
    22    {
    23      "collectionName": "coll",
    24      "databaseName": "test",
    25      "documents": []
    26    }
    27  ],
    28  "tests": [
    29    {
    30      "description": "timeoutMS can be configured on a MongoClient - listDatabases on client",
    31      "operations": [
    32        {
    33          "name": "createEntities",
    34          "object": "testRunner",
    35          "arguments": {
    36            "entities": [
    37              {
    38                "client": {
    39                  "id": "client",
    40                  "uriOptions": {
    41                    "timeoutMS": 50
    42                  },
    43                  "useMultipleMongoses": false,
    44                  "observeEvents": [
    45                    "commandStartedEvent"
    46                  ]
    47                }
    48              },
    49              {
    50                "database": {
    51                  "id": "database",
    52                  "client": "client",
    53                  "databaseName": "test"
    54                }
    55              },
    56              {
    57                "collection": {
    58                  "id": "collection",
    59                  "database": "database",
    60                  "collectionName": "coll"
    61                }
    62              }
    63            ]
    64          }
    65        },
    66        {
    67          "name": "failPoint",
    68          "object": "testRunner",
    69          "arguments": {
    70            "client": "failPointClient",
    71            "failPoint": {
    72              "configureFailPoint": "failCommand",
    73              "mode": {
    74                "times": 1
    75              },
    76              "data": {
    77                "failCommands": [
    78                  "listDatabases"
    79                ],
    80                "blockConnection": true,
    81                "blockTimeMS": 60
    82              }
    83            }
    84          }
    85        },
    86        {
    87          "name": "listDatabases",
    88          "object": "client",
    89          "arguments": {
    90            "filter": {}
    91          },
    92          "expectError": {
    93            "isTimeoutError": true
    94          }
    95        }
    96      ],
    97      "expectEvents": [
    98        {
    99          "client": "client",
   100          "events": [
   101            {
   102              "commandStartedEvent": {
   103                "commandName": "listDatabases",
   104                "databaseName": "admin",
   105                "command": {
   106                  "listDatabases": 1,
   107                  "maxTimeMS": {
   108                    "$$type": [
   109                      "int",
   110                      "long"
   111                    ]
   112                  }
   113                }
   114              }
   115            }
   116          ]
   117        }
   118      ]
   119    },
   120    {
   121      "description": "timeoutMS can be set to 0 on a MongoClient - listDatabases on client",
   122      "operations": [
   123        {
   124          "name": "createEntities",
   125          "object": "testRunner",
   126          "arguments": {
   127            "entities": [
   128              {
   129                "client": {
   130                  "id": "client",
   131                  "uriOptions": {
   132                    "timeoutMS": 0
   133                  },
   134                  "useMultipleMongoses": false,
   135                  "observeEvents": [
   136                    "commandStartedEvent"
   137                  ],
   138                  "ignoreCommandMonitoringEvents": [
   139                    "killCursors"
   140                  ]
   141                }
   142              },
   143              {
   144                "database": {
   145                  "id": "database",
   146                  "client": "client",
   147                  "databaseName": "test"
   148                }
   149              },
   150              {
   151                "collection": {
   152                  "id": "collection",
   153                  "database": "database",
   154                  "collectionName": "coll"
   155                }
   156              }
   157            ]
   158          }
   159        },
   160        {
   161          "name": "failPoint",
   162          "object": "testRunner",
   163          "arguments": {
   164            "client": "failPointClient",
   165            "failPoint": {
   166              "configureFailPoint": "failCommand",
   167              "mode": {
   168                "times": 1
   169              },
   170              "data": {
   171                "failCommands": [
   172                  "listDatabases"
   173                ],
   174                "blockConnection": true,
   175                "blockTimeMS": 15
   176              }
   177            }
   178          }
   179        },
   180        {
   181          "name": "listDatabases",
   182          "object": "client",
   183          "arguments": {
   184            "filter": {}
   185          }
   186        }
   187      ],
   188      "expectEvents": [
   189        {
   190          "client": "client",
   191          "events": [
   192            {
   193              "commandStartedEvent": {
   194                "commandName": "listDatabases",
   195                "databaseName": "admin",
   196                "command": {
   197                  "listDatabases": 1,
   198                  "maxTimeMS": {
   199                    "$$exists": false
   200                  }
   201                }
   202              }
   203            }
   204          ]
   205        }
   206      ]
   207    },
   208    {
   209      "description": "timeoutMS can be configured on a MongoClient - listDatabaseNames on client",
   210      "operations": [
   211        {
   212          "name": "createEntities",
   213          "object": "testRunner",
   214          "arguments": {
   215            "entities": [
   216              {
   217                "client": {
   218                  "id": "client",
   219                  "uriOptions": {
   220                    "timeoutMS": 50
   221                  },
   222                  "useMultipleMongoses": false,
   223                  "observeEvents": [
   224                    "commandStartedEvent"
   225                  ]
   226                }
   227              },
   228              {
   229                "database": {
   230                  "id": "database",
   231                  "client": "client",
   232                  "databaseName": "test"
   233                }
   234              },
   235              {
   236                "collection": {
   237                  "id": "collection",
   238                  "database": "database",
   239                  "collectionName": "coll"
   240                }
   241              }
   242            ]
   243          }
   244        },
   245        {
   246          "name": "failPoint",
   247          "object": "testRunner",
   248          "arguments": {
   249            "client": "failPointClient",
   250            "failPoint": {
   251              "configureFailPoint": "failCommand",
   252              "mode": {
   253                "times": 1
   254              },
   255              "data": {
   256                "failCommands": [
   257                  "listDatabases"
   258                ],
   259                "blockConnection": true,
   260                "blockTimeMS": 60
   261              }
   262            }
   263          }
   264        },
   265        {
   266          "name": "listDatabaseNames",
   267          "object": "client",
   268          "arguments": {
   269            "filter": {}
   270          },
   271          "expectError": {
   272            "isTimeoutError": true
   273          }
   274        }
   275      ],
   276      "expectEvents": [
   277        {
   278          "client": "client",
   279          "events": [
   280            {
   281              "commandStartedEvent": {
   282                "commandName": "listDatabases",
   283                "databaseName": "admin",
   284                "command": {
   285                  "listDatabases": 1,
   286                  "maxTimeMS": {
   287                    "$$type": [
   288                      "int",
   289                      "long"
   290                    ]
   291                  }
   292                }
   293              }
   294            }
   295          ]
   296        }
   297      ]
   298    },
   299    {
   300      "description": "timeoutMS can be set to 0 on a MongoClient - listDatabaseNames on client",
   301      "operations": [
   302        {
   303          "name": "createEntities",
   304          "object": "testRunner",
   305          "arguments": {
   306            "entities": [
   307              {
   308                "client": {
   309                  "id": "client",
   310                  "uriOptions": {
   311                    "timeoutMS": 0
   312                  },
   313                  "useMultipleMongoses": false,
   314                  "observeEvents": [
   315                    "commandStartedEvent"
   316                  ],
   317                  "ignoreCommandMonitoringEvents": [
   318                    "killCursors"
   319                  ]
   320                }
   321              },
   322              {
   323                "database": {
   324                  "id": "database",
   325                  "client": "client",
   326                  "databaseName": "test"
   327                }
   328              },
   329              {
   330                "collection": {
   331                  "id": "collection",
   332                  "database": "database",
   333                  "collectionName": "coll"
   334                }
   335              }
   336            ]
   337          }
   338        },
   339        {
   340          "name": "failPoint",
   341          "object": "testRunner",
   342          "arguments": {
   343            "client": "failPointClient",
   344            "failPoint": {
   345              "configureFailPoint": "failCommand",
   346              "mode": {
   347                "times": 1
   348              },
   349              "data": {
   350                "failCommands": [
   351                  "listDatabases"
   352                ],
   353                "blockConnection": true,
   354                "blockTimeMS": 15
   355              }
   356            }
   357          }
   358        },
   359        {
   360          "name": "listDatabaseNames",
   361          "object": "client",
   362          "arguments": {
   363            "filter": {}
   364          }
   365        }
   366      ],
   367      "expectEvents": [
   368        {
   369          "client": "client",
   370          "events": [
   371            {
   372              "commandStartedEvent": {
   373                "commandName": "listDatabases",
   374                "databaseName": "admin",
   375                "command": {
   376                  "listDatabases": 1,
   377                  "maxTimeMS": {
   378                    "$$exists": false
   379                  }
   380                }
   381              }
   382            }
   383          ]
   384        }
   385      ]
   386    },
   387    {
   388      "description": "timeoutMS can be configured on a MongoClient - createChangeStream on client",
   389      "operations": [
   390        {
   391          "name": "createEntities",
   392          "object": "testRunner",
   393          "arguments": {
   394            "entities": [
   395              {
   396                "client": {
   397                  "id": "client",
   398                  "uriOptions": {
   399                    "timeoutMS": 50
   400                  },
   401                  "useMultipleMongoses": false,
   402                  "observeEvents": [
   403                    "commandStartedEvent"
   404                  ]
   405                }
   406              },
   407              {
   408                "database": {
   409                  "id": "database",
   410                  "client": "client",
   411                  "databaseName": "test"
   412                }
   413              },
   414              {
   415                "collection": {
   416                  "id": "collection",
   417                  "database": "database",
   418                  "collectionName": "coll"
   419                }
   420              }
   421            ]
   422          }
   423        },
   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                  "aggregate"
   437                ],
   438                "blockConnection": true,
   439                "blockTimeMS": 60
   440              }
   441            }
   442          }
   443        },
   444        {
   445          "name": "createChangeStream",
   446          "object": "client",
   447          "arguments": {
   448            "pipeline": []
   449          },
   450          "expectError": {
   451            "isTimeoutError": true
   452          }
   453        }
   454      ],
   455      "expectEvents": [
   456        {
   457          "client": "client",
   458          "events": [
   459            {
   460              "commandStartedEvent": {
   461                "commandName": "aggregate",
   462                "databaseName": "admin",
   463                "command": {
   464                  "aggregate": 1,
   465                  "maxTimeMS": {
   466                    "$$type": [
   467                      "int",
   468                      "long"
   469                    ]
   470                  }
   471                }
   472              }
   473            }
   474          ]
   475        }
   476      ]
   477    },
   478    {
   479      "description": "timeoutMS can be set to 0 on a MongoClient - createChangeStream on client",
   480      "operations": [
   481        {
   482          "name": "createEntities",
   483          "object": "testRunner",
   484          "arguments": {
   485            "entities": [
   486              {
   487                "client": {
   488                  "id": "client",
   489                  "uriOptions": {
   490                    "timeoutMS": 0
   491                  },
   492                  "useMultipleMongoses": false,
   493                  "observeEvents": [
   494                    "commandStartedEvent"
   495                  ],
   496                  "ignoreCommandMonitoringEvents": [
   497                    "killCursors"
   498                  ]
   499                }
   500              },
   501              {
   502                "database": {
   503                  "id": "database",
   504                  "client": "client",
   505                  "databaseName": "test"
   506                }
   507              },
   508              {
   509                "collection": {
   510                  "id": "collection",
   511                  "database": "database",
   512                  "collectionName": "coll"
   513                }
   514              }
   515            ]
   516          }
   517        },
   518        {
   519          "name": "failPoint",
   520          "object": "testRunner",
   521          "arguments": {
   522            "client": "failPointClient",
   523            "failPoint": {
   524              "configureFailPoint": "failCommand",
   525              "mode": {
   526                "times": 1
   527              },
   528              "data": {
   529                "failCommands": [
   530                  "aggregate"
   531                ],
   532                "blockConnection": true,
   533                "blockTimeMS": 15
   534              }
   535            }
   536          }
   537        },
   538        {
   539          "name": "createChangeStream",
   540          "object": "client",
   541          "arguments": {
   542            "pipeline": []
   543          }
   544        }
   545      ],
   546      "expectEvents": [
   547        {
   548          "client": "client",
   549          "events": [
   550            {
   551              "commandStartedEvent": {
   552                "commandName": "aggregate",
   553                "databaseName": "admin",
   554                "command": {
   555                  "aggregate": 1,
   556                  "maxTimeMS": {
   557                    "$$exists": false
   558                  }
   559                }
   560              }
   561            }
   562          ]
   563        }
   564      ]
   565    },
   566    {
   567      "description": "timeoutMS can be configured on a MongoClient - aggregate on database",
   568      "operations": [
   569        {
   570          "name": "createEntities",
   571          "object": "testRunner",
   572          "arguments": {
   573            "entities": [
   574              {
   575                "client": {
   576                  "id": "client",
   577                  "uriOptions": {
   578                    "timeoutMS": 50
   579                  },
   580                  "useMultipleMongoses": false,
   581                  "observeEvents": [
   582                    "commandStartedEvent"
   583                  ]
   584                }
   585              },
   586              {
   587                "database": {
   588                  "id": "database",
   589                  "client": "client",
   590                  "databaseName": "test"
   591                }
   592              },
   593              {
   594                "collection": {
   595                  "id": "collection",
   596                  "database": "database",
   597                  "collectionName": "coll"
   598                }
   599              }
   600            ]
   601          }
   602        },
   603        {
   604          "name": "failPoint",
   605          "object": "testRunner",
   606          "arguments": {
   607            "client": "failPointClient",
   608            "failPoint": {
   609              "configureFailPoint": "failCommand",
   610              "mode": {
   611                "times": 1
   612              },
   613              "data": {
   614                "failCommands": [
   615                  "aggregate"
   616                ],
   617                "blockConnection": true,
   618                "blockTimeMS": 60
   619              }
   620            }
   621          }
   622        },
   623        {
   624          "name": "aggregate",
   625          "object": "database",
   626          "arguments": {
   627            "pipeline": [
   628              {
   629                "$listLocalSessions": {}
   630              },
   631              {
   632                "$limit": 1
   633              }
   634            ]
   635          },
   636          "expectError": {
   637            "isTimeoutError": true
   638          }
   639        }
   640      ],
   641      "expectEvents": [
   642        {
   643          "client": "client",
   644          "events": [
   645            {
   646              "commandStartedEvent": {
   647                "commandName": "aggregate",
   648                "databaseName": "test",
   649                "command": {
   650                  "aggregate": 1,
   651                  "maxTimeMS": {
   652                    "$$type": [
   653                      "int",
   654                      "long"
   655                    ]
   656                  }
   657                }
   658              }
   659            }
   660          ]
   661        }
   662      ]
   663    },
   664    {
   665      "description": "timeoutMS can be set to 0 on a MongoClient - aggregate on database",
   666      "operations": [
   667        {
   668          "name": "createEntities",
   669          "object": "testRunner",
   670          "arguments": {
   671            "entities": [
   672              {
   673                "client": {
   674                  "id": "client",
   675                  "uriOptions": {
   676                    "timeoutMS": 0
   677                  },
   678                  "useMultipleMongoses": false,
   679                  "observeEvents": [
   680                    "commandStartedEvent"
   681                  ],
   682                  "ignoreCommandMonitoringEvents": [
   683                    "killCursors"
   684                  ]
   685                }
   686              },
   687              {
   688                "database": {
   689                  "id": "database",
   690                  "client": "client",
   691                  "databaseName": "test"
   692                }
   693              },
   694              {
   695                "collection": {
   696                  "id": "collection",
   697                  "database": "database",
   698                  "collectionName": "coll"
   699                }
   700              }
   701            ]
   702          }
   703        },
   704        {
   705          "name": "failPoint",
   706          "object": "testRunner",
   707          "arguments": {
   708            "client": "failPointClient",
   709            "failPoint": {
   710              "configureFailPoint": "failCommand",
   711              "mode": {
   712                "times": 1
   713              },
   714              "data": {
   715                "failCommands": [
   716                  "aggregate"
   717                ],
   718                "blockConnection": true,
   719                "blockTimeMS": 15
   720              }
   721            }
   722          }
   723        },
   724        {
   725          "name": "aggregate",
   726          "object": "database",
   727          "arguments": {
   728            "pipeline": [
   729              {
   730                "$listLocalSessions": {}
   731              },
   732              {
   733                "$limit": 1
   734              }
   735            ]
   736          }
   737        }
   738      ],
   739      "expectEvents": [
   740        {
   741          "client": "client",
   742          "events": [
   743            {
   744              "commandStartedEvent": {
   745                "commandName": "aggregate",
   746                "databaseName": "test",
   747                "command": {
   748                  "aggregate": 1,
   749                  "maxTimeMS": {
   750                    "$$exists": false
   751                  }
   752                }
   753              }
   754            }
   755          ]
   756        }
   757      ]
   758    },
   759    {
   760      "description": "timeoutMS can be configured on a MongoClient - listCollections on database",
   761      "operations": [
   762        {
   763          "name": "createEntities",
   764          "object": "testRunner",
   765          "arguments": {
   766            "entities": [
   767              {
   768                "client": {
   769                  "id": "client",
   770                  "uriOptions": {
   771                    "timeoutMS": 50
   772                  },
   773                  "useMultipleMongoses": false,
   774                  "observeEvents": [
   775                    "commandStartedEvent"
   776                  ]
   777                }
   778              },
   779              {
   780                "database": {
   781                  "id": "database",
   782                  "client": "client",
   783                  "databaseName": "test"
   784                }
   785              },
   786              {
   787                "collection": {
   788                  "id": "collection",
   789                  "database": "database",
   790                  "collectionName": "coll"
   791                }
   792              }
   793            ]
   794          }
   795        },
   796        {
   797          "name": "failPoint",
   798          "object": "testRunner",
   799          "arguments": {
   800            "client": "failPointClient",
   801            "failPoint": {
   802              "configureFailPoint": "failCommand",
   803              "mode": {
   804                "times": 1
   805              },
   806              "data": {
   807                "failCommands": [
   808                  "listCollections"
   809                ],
   810                "blockConnection": true,
   811                "blockTimeMS": 60
   812              }
   813            }
   814          }
   815        },
   816        {
   817          "name": "listCollections",
   818          "object": "database",
   819          "arguments": {
   820            "filter": {}
   821          },
   822          "expectError": {
   823            "isTimeoutError": true
   824          }
   825        }
   826      ],
   827      "expectEvents": [
   828        {
   829          "client": "client",
   830          "events": [
   831            {
   832              "commandStartedEvent": {
   833                "commandName": "listCollections",
   834                "databaseName": "test",
   835                "command": {
   836                  "listCollections": 1,
   837                  "maxTimeMS": {
   838                    "$$type": [
   839                      "int",
   840                      "long"
   841                    ]
   842                  }
   843                }
   844              }
   845            }
   846          ]
   847        }
   848      ]
   849    },
   850    {
   851      "description": "timeoutMS can be set to 0 on a MongoClient - listCollections on database",
   852      "operations": [
   853        {
   854          "name": "createEntities",
   855          "object": "testRunner",
   856          "arguments": {
   857            "entities": [
   858              {
   859                "client": {
   860                  "id": "client",
   861                  "uriOptions": {
   862                    "timeoutMS": 0
   863                  },
   864                  "useMultipleMongoses": false,
   865                  "observeEvents": [
   866                    "commandStartedEvent"
   867                  ],
   868                  "ignoreCommandMonitoringEvents": [
   869                    "killCursors"
   870                  ]
   871                }
   872              },
   873              {
   874                "database": {
   875                  "id": "database",
   876                  "client": "client",
   877                  "databaseName": "test"
   878                }
   879              },
   880              {
   881                "collection": {
   882                  "id": "collection",
   883                  "database": "database",
   884                  "collectionName": "coll"
   885                }
   886              }
   887            ]
   888          }
   889        },
   890        {
   891          "name": "failPoint",
   892          "object": "testRunner",
   893          "arguments": {
   894            "client": "failPointClient",
   895            "failPoint": {
   896              "configureFailPoint": "failCommand",
   897              "mode": {
   898                "times": 1
   899              },
   900              "data": {
   901                "failCommands": [
   902                  "listCollections"
   903                ],
   904                "blockConnection": true,
   905                "blockTimeMS": 15
   906              }
   907            }
   908          }
   909        },
   910        {
   911          "name": "listCollections",
   912          "object": "database",
   913          "arguments": {
   914            "filter": {}
   915          }
   916        }
   917      ],
   918      "expectEvents": [
   919        {
   920          "client": "client",
   921          "events": [
   922            {
   923              "commandStartedEvent": {
   924                "commandName": "listCollections",
   925                "databaseName": "test",
   926                "command": {
   927                  "listCollections": 1,
   928                  "maxTimeMS": {
   929                    "$$exists": false
   930                  }
   931                }
   932              }
   933            }
   934          ]
   935        }
   936      ]
   937    },
   938    {
   939      "description": "timeoutMS can be configured on a MongoClient - listCollectionNames on database",
   940      "operations": [
   941        {
   942          "name": "createEntities",
   943          "object": "testRunner",
   944          "arguments": {
   945            "entities": [
   946              {
   947                "client": {
   948                  "id": "client",
   949                  "uriOptions": {
   950                    "timeoutMS": 50
   951                  },
   952                  "useMultipleMongoses": false,
   953                  "observeEvents": [
   954                    "commandStartedEvent"
   955                  ]
   956                }
   957              },
   958              {
   959                "database": {
   960                  "id": "database",
   961                  "client": "client",
   962                  "databaseName": "test"
   963                }
   964              },
   965              {
   966                "collection": {
   967                  "id": "collection",
   968                  "database": "database",
   969                  "collectionName": "coll"
   970                }
   971              }
   972            ]
   973          }
   974        },
   975        {
   976          "name": "failPoint",
   977          "object": "testRunner",
   978          "arguments": {
   979            "client": "failPointClient",
   980            "failPoint": {
   981              "configureFailPoint": "failCommand",
   982              "mode": {
   983                "times": 1
   984              },
   985              "data": {
   986                "failCommands": [
   987                  "listCollections"
   988                ],
   989                "blockConnection": true,
   990                "blockTimeMS": 60
   991              }
   992            }
   993          }
   994        },
   995        {
   996          "name": "listCollectionNames",
   997          "object": "database",
   998          "arguments": {
   999            "filter": {}
  1000          },
  1001          "expectError": {
  1002            "isTimeoutError": true
  1003          }
  1004        }
  1005      ],
  1006      "expectEvents": [
  1007        {
  1008          "client": "client",
  1009          "events": [
  1010            {
  1011              "commandStartedEvent": {
  1012                "commandName": "listCollections",
  1013                "databaseName": "test",
  1014                "command": {
  1015                  "listCollections": 1,
  1016                  "maxTimeMS": {
  1017                    "$$type": [
  1018                      "int",
  1019                      "long"
  1020                    ]
  1021                  }
  1022                }
  1023              }
  1024            }
  1025          ]
  1026        }
  1027      ]
  1028    },
  1029    {
  1030      "description": "timeoutMS can be set to 0 on a MongoClient - listCollectionNames on database",
  1031      "operations": [
  1032        {
  1033          "name": "createEntities",
  1034          "object": "testRunner",
  1035          "arguments": {
  1036            "entities": [
  1037              {
  1038                "client": {
  1039                  "id": "client",
  1040                  "uriOptions": {
  1041                    "timeoutMS": 0
  1042                  },
  1043                  "useMultipleMongoses": false,
  1044                  "observeEvents": [
  1045                    "commandStartedEvent"
  1046                  ],
  1047                  "ignoreCommandMonitoringEvents": [
  1048                    "killCursors"
  1049                  ]
  1050                }
  1051              },
  1052              {
  1053                "database": {
  1054                  "id": "database",
  1055                  "client": "client",
  1056                  "databaseName": "test"
  1057                }
  1058              },
  1059              {
  1060                "collection": {
  1061                  "id": "collection",
  1062                  "database": "database",
  1063                  "collectionName": "coll"
  1064                }
  1065              }
  1066            ]
  1067          }
  1068        },
  1069        {
  1070          "name": "failPoint",
  1071          "object": "testRunner",
  1072          "arguments": {
  1073            "client": "failPointClient",
  1074            "failPoint": {
  1075              "configureFailPoint": "failCommand",
  1076              "mode": {
  1077                "times": 1
  1078              },
  1079              "data": {
  1080                "failCommands": [
  1081                  "listCollections"
  1082                ],
  1083                "blockConnection": true,
  1084                "blockTimeMS": 15
  1085              }
  1086            }
  1087          }
  1088        },
  1089        {
  1090          "name": "listCollectionNames",
  1091          "object": "database",
  1092          "arguments": {
  1093            "filter": {}
  1094          }
  1095        }
  1096      ],
  1097      "expectEvents": [
  1098        {
  1099          "client": "client",
  1100          "events": [
  1101            {
  1102              "commandStartedEvent": {
  1103                "commandName": "listCollections",
  1104                "databaseName": "test",
  1105                "command": {
  1106                  "listCollections": 1,
  1107                  "maxTimeMS": {
  1108                    "$$exists": false
  1109                  }
  1110                }
  1111              }
  1112            }
  1113          ]
  1114        }
  1115      ]
  1116    },
  1117    {
  1118      "description": "timeoutMS can be configured on a MongoClient - runCommand on database",
  1119      "operations": [
  1120        {
  1121          "name": "createEntities",
  1122          "object": "testRunner",
  1123          "arguments": {
  1124            "entities": [
  1125              {
  1126                "client": {
  1127                  "id": "client",
  1128                  "uriOptions": {
  1129                    "timeoutMS": 50
  1130                  },
  1131                  "useMultipleMongoses": false,
  1132                  "observeEvents": [
  1133                    "commandStartedEvent"
  1134                  ]
  1135                }
  1136              },
  1137              {
  1138                "database": {
  1139                  "id": "database",
  1140                  "client": "client",
  1141                  "databaseName": "test"
  1142                }
  1143              },
  1144              {
  1145                "collection": {
  1146                  "id": "collection",
  1147                  "database": "database",
  1148                  "collectionName": "coll"
  1149                }
  1150              }
  1151            ]
  1152          }
  1153        },
  1154        {
  1155          "name": "failPoint",
  1156          "object": "testRunner",
  1157          "arguments": {
  1158            "client": "failPointClient",
  1159            "failPoint": {
  1160              "configureFailPoint": "failCommand",
  1161              "mode": {
  1162                "times": 1
  1163              },
  1164              "data": {
  1165                "failCommands": [
  1166                  "ping"
  1167                ],
  1168                "blockConnection": true,
  1169                "blockTimeMS": 60
  1170              }
  1171            }
  1172          }
  1173        },
  1174        {
  1175          "name": "runCommand",
  1176          "object": "database",
  1177          "arguments": {
  1178            "command": {
  1179              "ping": 1
  1180            }
  1181          },
  1182          "expectError": {
  1183            "isTimeoutError": true
  1184          }
  1185        }
  1186      ],
  1187      "expectEvents": [
  1188        {
  1189          "client": "client",
  1190          "events": [
  1191            {
  1192              "commandStartedEvent": {
  1193                "commandName": "ping",
  1194                "databaseName": "test",
  1195                "command": {
  1196                  "ping": 1,
  1197                  "maxTimeMS": {
  1198                    "$$type": [
  1199                      "int",
  1200                      "long"
  1201                    ]
  1202                  }
  1203                }
  1204              }
  1205            }
  1206          ]
  1207        }
  1208      ]
  1209    },
  1210    {
  1211      "description": "timeoutMS can be set to 0 on a MongoClient - runCommand on database",
  1212      "operations": [
  1213        {
  1214          "name": "createEntities",
  1215          "object": "testRunner",
  1216          "arguments": {
  1217            "entities": [
  1218              {
  1219                "client": {
  1220                  "id": "client",
  1221                  "uriOptions": {
  1222                    "timeoutMS": 0
  1223                  },
  1224                  "useMultipleMongoses": false,
  1225                  "observeEvents": [
  1226                    "commandStartedEvent"
  1227                  ],
  1228                  "ignoreCommandMonitoringEvents": [
  1229                    "killCursors"
  1230                  ]
  1231                }
  1232              },
  1233              {
  1234                "database": {
  1235                  "id": "database",
  1236                  "client": "client",
  1237                  "databaseName": "test"
  1238                }
  1239              },
  1240              {
  1241                "collection": {
  1242                  "id": "collection",
  1243                  "database": "database",
  1244                  "collectionName": "coll"
  1245                }
  1246              }
  1247            ]
  1248          }
  1249        },
  1250        {
  1251          "name": "failPoint",
  1252          "object": "testRunner",
  1253          "arguments": {
  1254            "client": "failPointClient",
  1255            "failPoint": {
  1256              "configureFailPoint": "failCommand",
  1257              "mode": {
  1258                "times": 1
  1259              },
  1260              "data": {
  1261                "failCommands": [
  1262                  "ping"
  1263                ],
  1264                "blockConnection": true,
  1265                "blockTimeMS": 15
  1266              }
  1267            }
  1268          }
  1269        },
  1270        {
  1271          "name": "runCommand",
  1272          "object": "database",
  1273          "arguments": {
  1274            "command": {
  1275              "ping": 1
  1276            }
  1277          }
  1278        }
  1279      ],
  1280      "expectEvents": [
  1281        {
  1282          "client": "client",
  1283          "events": [
  1284            {
  1285              "commandStartedEvent": {
  1286                "commandName": "ping",
  1287                "databaseName": "test",
  1288                "command": {
  1289                  "ping": 1,
  1290                  "maxTimeMS": {
  1291                    "$$exists": false
  1292                  }
  1293                }
  1294              }
  1295            }
  1296          ]
  1297        }
  1298      ]
  1299    },
  1300    {
  1301      "description": "timeoutMS can be configured on a MongoClient - createChangeStream on database",
  1302      "operations": [
  1303        {
  1304          "name": "createEntities",
  1305          "object": "testRunner",
  1306          "arguments": {
  1307            "entities": [
  1308              {
  1309                "client": {
  1310                  "id": "client",
  1311                  "uriOptions": {
  1312                    "timeoutMS": 50
  1313                  },
  1314                  "useMultipleMongoses": false,
  1315                  "observeEvents": [
  1316                    "commandStartedEvent"
  1317                  ]
  1318                }
  1319              },
  1320              {
  1321                "database": {
  1322                  "id": "database",
  1323                  "client": "client",
  1324                  "databaseName": "test"
  1325                }
  1326              },
  1327              {
  1328                "collection": {
  1329                  "id": "collection",
  1330                  "database": "database",
  1331                  "collectionName": "coll"
  1332                }
  1333              }
  1334            ]
  1335          }
  1336        },
  1337        {
  1338          "name": "failPoint",
  1339          "object": "testRunner",
  1340          "arguments": {
  1341            "client": "failPointClient",
  1342            "failPoint": {
  1343              "configureFailPoint": "failCommand",
  1344              "mode": {
  1345                "times": 1
  1346              },
  1347              "data": {
  1348                "failCommands": [
  1349                  "aggregate"
  1350                ],
  1351                "blockConnection": true,
  1352                "blockTimeMS": 60
  1353              }
  1354            }
  1355          }
  1356        },
  1357        {
  1358          "name": "createChangeStream",
  1359          "object": "database",
  1360          "arguments": {
  1361            "pipeline": []
  1362          },
  1363          "expectError": {
  1364            "isTimeoutError": true
  1365          }
  1366        }
  1367      ],
  1368      "expectEvents": [
  1369        {
  1370          "client": "client",
  1371          "events": [
  1372            {
  1373              "commandStartedEvent": {
  1374                "commandName": "aggregate",
  1375                "databaseName": "test",
  1376                "command": {
  1377                  "aggregate": 1,
  1378                  "maxTimeMS": {
  1379                    "$$type": [
  1380                      "int",
  1381                      "long"
  1382                    ]
  1383                  }
  1384                }
  1385              }
  1386            }
  1387          ]
  1388        }
  1389      ]
  1390    },
  1391    {
  1392      "description": "timeoutMS can be set to 0 on a MongoClient - createChangeStream on database",
  1393      "operations": [
  1394        {
  1395          "name": "createEntities",
  1396          "object": "testRunner",
  1397          "arguments": {
  1398            "entities": [
  1399              {
  1400                "client": {
  1401                  "id": "client",
  1402                  "uriOptions": {
  1403                    "timeoutMS": 0
  1404                  },
  1405                  "useMultipleMongoses": false,
  1406                  "observeEvents": [
  1407                    "commandStartedEvent"
  1408                  ],
  1409                  "ignoreCommandMonitoringEvents": [
  1410                    "killCursors"
  1411                  ]
  1412                }
  1413              },
  1414              {
  1415                "database": {
  1416                  "id": "database",
  1417                  "client": "client",
  1418                  "databaseName": "test"
  1419                }
  1420              },
  1421              {
  1422                "collection": {
  1423                  "id": "collection",
  1424                  "database": "database",
  1425                  "collectionName": "coll"
  1426                }
  1427              }
  1428            ]
  1429          }
  1430        },
  1431        {
  1432          "name": "failPoint",
  1433          "object": "testRunner",
  1434          "arguments": {
  1435            "client": "failPointClient",
  1436            "failPoint": {
  1437              "configureFailPoint": "failCommand",
  1438              "mode": {
  1439                "times": 1
  1440              },
  1441              "data": {
  1442                "failCommands": [
  1443                  "aggregate"
  1444                ],
  1445                "blockConnection": true,
  1446                "blockTimeMS": 15
  1447              }
  1448            }
  1449          }
  1450        },
  1451        {
  1452          "name": "createChangeStream",
  1453          "object": "database",
  1454          "arguments": {
  1455            "pipeline": []
  1456          }
  1457        }
  1458      ],
  1459      "expectEvents": [
  1460        {
  1461          "client": "client",
  1462          "events": [
  1463            {
  1464              "commandStartedEvent": {
  1465                "commandName": "aggregate",
  1466                "databaseName": "test",
  1467                "command": {
  1468                  "aggregate": 1,
  1469                  "maxTimeMS": {
  1470                    "$$exists": false
  1471                  }
  1472                }
  1473              }
  1474            }
  1475          ]
  1476        }
  1477      ]
  1478    },
  1479    {
  1480      "description": "timeoutMS can be configured on a MongoClient - aggregate on collection",
  1481      "operations": [
  1482        {
  1483          "name": "createEntities",
  1484          "object": "testRunner",
  1485          "arguments": {
  1486            "entities": [
  1487              {
  1488                "client": {
  1489                  "id": "client",
  1490                  "uriOptions": {
  1491                    "timeoutMS": 50
  1492                  },
  1493                  "useMultipleMongoses": false,
  1494                  "observeEvents": [
  1495                    "commandStartedEvent"
  1496                  ]
  1497                }
  1498              },
  1499              {
  1500                "database": {
  1501                  "id": "database",
  1502                  "client": "client",
  1503                  "databaseName": "test"
  1504                }
  1505              },
  1506              {
  1507                "collection": {
  1508                  "id": "collection",
  1509                  "database": "database",
  1510                  "collectionName": "coll"
  1511                }
  1512              }
  1513            ]
  1514          }
  1515        },
  1516        {
  1517          "name": "failPoint",
  1518          "object": "testRunner",
  1519          "arguments": {
  1520            "client": "failPointClient",
  1521            "failPoint": {
  1522              "configureFailPoint": "failCommand",
  1523              "mode": {
  1524                "times": 1
  1525              },
  1526              "data": {
  1527                "failCommands": [
  1528                  "aggregate"
  1529                ],
  1530                "blockConnection": true,
  1531                "blockTimeMS": 60
  1532              }
  1533            }
  1534          }
  1535        },
  1536        {
  1537          "name": "aggregate",
  1538          "object": "collection",
  1539          "arguments": {
  1540            "pipeline": []
  1541          },
  1542          "expectError": {
  1543            "isTimeoutError": true
  1544          }
  1545        }
  1546      ],
  1547      "expectEvents": [
  1548        {
  1549          "client": "client",
  1550          "events": [
  1551            {
  1552              "commandStartedEvent": {
  1553                "commandName": "aggregate",
  1554                "databaseName": "test",
  1555                "command": {
  1556                  "aggregate": "coll",
  1557                  "maxTimeMS": {
  1558                    "$$type": [
  1559                      "int",
  1560                      "long"
  1561                    ]
  1562                  }
  1563                }
  1564              }
  1565            }
  1566          ]
  1567        }
  1568      ]
  1569    },
  1570    {
  1571      "description": "timeoutMS can be set to 0 on a MongoClient - aggregate on collection",
  1572      "operations": [
  1573        {
  1574          "name": "createEntities",
  1575          "object": "testRunner",
  1576          "arguments": {
  1577            "entities": [
  1578              {
  1579                "client": {
  1580                  "id": "client",
  1581                  "uriOptions": {
  1582                    "timeoutMS": 0
  1583                  },
  1584                  "useMultipleMongoses": false,
  1585                  "observeEvents": [
  1586                    "commandStartedEvent"
  1587                  ],
  1588                  "ignoreCommandMonitoringEvents": [
  1589                    "killCursors"
  1590                  ]
  1591                }
  1592              },
  1593              {
  1594                "database": {
  1595                  "id": "database",
  1596                  "client": "client",
  1597                  "databaseName": "test"
  1598                }
  1599              },
  1600              {
  1601                "collection": {
  1602                  "id": "collection",
  1603                  "database": "database",
  1604                  "collectionName": "coll"
  1605                }
  1606              }
  1607            ]
  1608          }
  1609        },
  1610        {
  1611          "name": "failPoint",
  1612          "object": "testRunner",
  1613          "arguments": {
  1614            "client": "failPointClient",
  1615            "failPoint": {
  1616              "configureFailPoint": "failCommand",
  1617              "mode": {
  1618                "times": 1
  1619              },
  1620              "data": {
  1621                "failCommands": [
  1622                  "aggregate"
  1623                ],
  1624                "blockConnection": true,
  1625                "blockTimeMS": 15
  1626              }
  1627            }
  1628          }
  1629        },
  1630        {
  1631          "name": "aggregate",
  1632          "object": "collection",
  1633          "arguments": {
  1634            "pipeline": []
  1635          }
  1636        }
  1637      ],
  1638      "expectEvents": [
  1639        {
  1640          "client": "client",
  1641          "events": [
  1642            {
  1643              "commandStartedEvent": {
  1644                "commandName": "aggregate",
  1645                "databaseName": "test",
  1646                "command": {
  1647                  "aggregate": "coll",
  1648                  "maxTimeMS": {
  1649                    "$$exists": false
  1650                  }
  1651                }
  1652              }
  1653            }
  1654          ]
  1655        }
  1656      ]
  1657    },
  1658    {
  1659      "description": "timeoutMS can be configured on a MongoClient - count on collection",
  1660      "operations": [
  1661        {
  1662          "name": "createEntities",
  1663          "object": "testRunner",
  1664          "arguments": {
  1665            "entities": [
  1666              {
  1667                "client": {
  1668                  "id": "client",
  1669                  "uriOptions": {
  1670                    "timeoutMS": 50
  1671                  },
  1672                  "useMultipleMongoses": false,
  1673                  "observeEvents": [
  1674                    "commandStartedEvent"
  1675                  ]
  1676                }
  1677              },
  1678              {
  1679                "database": {
  1680                  "id": "database",
  1681                  "client": "client",
  1682                  "databaseName": "test"
  1683                }
  1684              },
  1685              {
  1686                "collection": {
  1687                  "id": "collection",
  1688                  "database": "database",
  1689                  "collectionName": "coll"
  1690                }
  1691              }
  1692            ]
  1693          }
  1694        },
  1695        {
  1696          "name": "failPoint",
  1697          "object": "testRunner",
  1698          "arguments": {
  1699            "client": "failPointClient",
  1700            "failPoint": {
  1701              "configureFailPoint": "failCommand",
  1702              "mode": {
  1703                "times": 1
  1704              },
  1705              "data": {
  1706                "failCommands": [
  1707                  "count"
  1708                ],
  1709                "blockConnection": true,
  1710                "blockTimeMS": 60
  1711              }
  1712            }
  1713          }
  1714        },
  1715        {
  1716          "name": "count",
  1717          "object": "collection",
  1718          "arguments": {
  1719            "filter": {}
  1720          },
  1721          "expectError": {
  1722            "isTimeoutError": true
  1723          }
  1724        }
  1725      ],
  1726      "expectEvents": [
  1727        {
  1728          "client": "client",
  1729          "events": [
  1730            {
  1731              "commandStartedEvent": {
  1732                "commandName": "count",
  1733                "databaseName": "test",
  1734                "command": {
  1735                  "count": "coll",
  1736                  "maxTimeMS": {
  1737                    "$$type": [
  1738                      "int",
  1739                      "long"
  1740                    ]
  1741                  }
  1742                }
  1743              }
  1744            }
  1745          ]
  1746        }
  1747      ]
  1748    },
  1749    {
  1750      "description": "timeoutMS can be set to 0 on a MongoClient - count on collection",
  1751      "operations": [
  1752        {
  1753          "name": "createEntities",
  1754          "object": "testRunner",
  1755          "arguments": {
  1756            "entities": [
  1757              {
  1758                "client": {
  1759                  "id": "client",
  1760                  "uriOptions": {
  1761                    "timeoutMS": 0
  1762                  },
  1763                  "useMultipleMongoses": false,
  1764                  "observeEvents": [
  1765                    "commandStartedEvent"
  1766                  ],
  1767                  "ignoreCommandMonitoringEvents": [
  1768                    "killCursors"
  1769                  ]
  1770                }
  1771              },
  1772              {
  1773                "database": {
  1774                  "id": "database",
  1775                  "client": "client",
  1776                  "databaseName": "test"
  1777                }
  1778              },
  1779              {
  1780                "collection": {
  1781                  "id": "collection",
  1782                  "database": "database",
  1783                  "collectionName": "coll"
  1784                }
  1785              }
  1786            ]
  1787          }
  1788        },
  1789        {
  1790          "name": "failPoint",
  1791          "object": "testRunner",
  1792          "arguments": {
  1793            "client": "failPointClient",
  1794            "failPoint": {
  1795              "configureFailPoint": "failCommand",
  1796              "mode": {
  1797                "times": 1
  1798              },
  1799              "data": {
  1800                "failCommands": [
  1801                  "count"
  1802                ],
  1803                "blockConnection": true,
  1804                "blockTimeMS": 15
  1805              }
  1806            }
  1807          }
  1808        },
  1809        {
  1810          "name": "count",
  1811          "object": "collection",
  1812          "arguments": {
  1813            "filter": {}
  1814          }
  1815        }
  1816      ],
  1817      "expectEvents": [
  1818        {
  1819          "client": "client",
  1820          "events": [
  1821            {
  1822              "commandStartedEvent": {
  1823                "commandName": "count",
  1824                "databaseName": "test",
  1825                "command": {
  1826                  "count": "coll",
  1827                  "maxTimeMS": {
  1828                    "$$exists": false
  1829                  }
  1830                }
  1831              }
  1832            }
  1833          ]
  1834        }
  1835      ]
  1836    },
  1837    {
  1838      "description": "timeoutMS can be configured on a MongoClient - countDocuments on collection",
  1839      "operations": [
  1840        {
  1841          "name": "createEntities",
  1842          "object": "testRunner",
  1843          "arguments": {
  1844            "entities": [
  1845              {
  1846                "client": {
  1847                  "id": "client",
  1848                  "uriOptions": {
  1849                    "timeoutMS": 50
  1850                  },
  1851                  "useMultipleMongoses": false,
  1852                  "observeEvents": [
  1853                    "commandStartedEvent"
  1854                  ]
  1855                }
  1856              },
  1857              {
  1858                "database": {
  1859                  "id": "database",
  1860                  "client": "client",
  1861                  "databaseName": "test"
  1862                }
  1863              },
  1864              {
  1865                "collection": {
  1866                  "id": "collection",
  1867                  "database": "database",
  1868                  "collectionName": "coll"
  1869                }
  1870              }
  1871            ]
  1872          }
  1873        },
  1874        {
  1875          "name": "failPoint",
  1876          "object": "testRunner",
  1877          "arguments": {
  1878            "client": "failPointClient",
  1879            "failPoint": {
  1880              "configureFailPoint": "failCommand",
  1881              "mode": {
  1882                "times": 1
  1883              },
  1884              "data": {
  1885                "failCommands": [
  1886                  "aggregate"
  1887                ],
  1888                "blockConnection": true,
  1889                "blockTimeMS": 60
  1890              }
  1891            }
  1892          }
  1893        },
  1894        {
  1895          "name": "countDocuments",
  1896          "object": "collection",
  1897          "arguments": {
  1898            "filter": {}
  1899          },
  1900          "expectError": {
  1901            "isTimeoutError": true
  1902          }
  1903        }
  1904      ],
  1905      "expectEvents": [
  1906        {
  1907          "client": "client",
  1908          "events": [
  1909            {
  1910              "commandStartedEvent": {
  1911                "commandName": "aggregate",
  1912                "databaseName": "test",
  1913                "command": {
  1914                  "aggregate": "coll",
  1915                  "maxTimeMS": {
  1916                    "$$type": [
  1917                      "int",
  1918                      "long"
  1919                    ]
  1920                  }
  1921                }
  1922              }
  1923            }
  1924          ]
  1925        }
  1926      ]
  1927    },
  1928    {
  1929      "description": "timeoutMS can be set to 0 on a MongoClient - countDocuments on collection",
  1930      "operations": [
  1931        {
  1932          "name": "createEntities",
  1933          "object": "testRunner",
  1934          "arguments": {
  1935            "entities": [
  1936              {
  1937                "client": {
  1938                  "id": "client",
  1939                  "uriOptions": {
  1940                    "timeoutMS": 0
  1941                  },
  1942                  "useMultipleMongoses": false,
  1943                  "observeEvents": [
  1944                    "commandStartedEvent"
  1945                  ],
  1946                  "ignoreCommandMonitoringEvents": [
  1947                    "killCursors"
  1948                  ]
  1949                }
  1950              },
  1951              {
  1952                "database": {
  1953                  "id": "database",
  1954                  "client": "client",
  1955                  "databaseName": "test"
  1956                }
  1957              },
  1958              {
  1959                "collection": {
  1960                  "id": "collection",
  1961                  "database": "database",
  1962                  "collectionName": "coll"
  1963                }
  1964              }
  1965            ]
  1966          }
  1967        },
  1968        {
  1969          "name": "failPoint",
  1970          "object": "testRunner",
  1971          "arguments": {
  1972            "client": "failPointClient",
  1973            "failPoint": {
  1974              "configureFailPoint": "failCommand",
  1975              "mode": {
  1976                "times": 1
  1977              },
  1978              "data": {
  1979                "failCommands": [
  1980                  "aggregate"
  1981                ],
  1982                "blockConnection": true,
  1983                "blockTimeMS": 15
  1984              }
  1985            }
  1986          }
  1987        },
  1988        {
  1989          "name": "countDocuments",
  1990          "object": "collection",
  1991          "arguments": {
  1992            "filter": {}
  1993          }
  1994        }
  1995      ],
  1996      "expectEvents": [
  1997        {
  1998          "client": "client",
  1999          "events": [
  2000            {
  2001              "commandStartedEvent": {
  2002                "commandName": "aggregate",
  2003                "databaseName": "test",
  2004                "command": {
  2005                  "aggregate": "coll",
  2006                  "maxTimeMS": {
  2007                    "$$exists": false
  2008                  }
  2009                }
  2010              }
  2011            }
  2012          ]
  2013        }
  2014      ]
  2015    },
  2016    {
  2017      "description": "timeoutMS can be configured on a MongoClient - estimatedDocumentCount on collection",
  2018      "operations": [
  2019        {
  2020          "name": "createEntities",
  2021          "object": "testRunner",
  2022          "arguments": {
  2023            "entities": [
  2024              {
  2025                "client": {
  2026                  "id": "client",
  2027                  "uriOptions": {
  2028                    "timeoutMS": 50
  2029                  },
  2030                  "useMultipleMongoses": false,
  2031                  "observeEvents": [
  2032                    "commandStartedEvent"
  2033                  ]
  2034                }
  2035              },
  2036              {
  2037                "database": {
  2038                  "id": "database",
  2039                  "client": "client",
  2040                  "databaseName": "test"
  2041                }
  2042              },
  2043              {
  2044                "collection": {
  2045                  "id": "collection",
  2046                  "database": "database",
  2047                  "collectionName": "coll"
  2048                }
  2049              }
  2050            ]
  2051          }
  2052        },
  2053        {
  2054          "name": "failPoint",
  2055          "object": "testRunner",
  2056          "arguments": {
  2057            "client": "failPointClient",
  2058            "failPoint": {
  2059              "configureFailPoint": "failCommand",
  2060              "mode": {
  2061                "times": 1
  2062              },
  2063              "data": {
  2064                "failCommands": [
  2065                  "count"
  2066                ],
  2067                "blockConnection": true,
  2068                "blockTimeMS": 60
  2069              }
  2070            }
  2071          }
  2072        },
  2073        {
  2074          "name": "estimatedDocumentCount",
  2075          "object": "collection",
  2076          "expectError": {
  2077            "isTimeoutError": true
  2078          }
  2079        }
  2080      ],
  2081      "expectEvents": [
  2082        {
  2083          "client": "client",
  2084          "events": [
  2085            {
  2086              "commandStartedEvent": {
  2087                "commandName": "count",
  2088                "databaseName": "test",
  2089                "command": {
  2090                  "count": "coll",
  2091                  "maxTimeMS": {
  2092                    "$$type": [
  2093                      "int",
  2094                      "long"
  2095                    ]
  2096                  }
  2097                }
  2098              }
  2099            }
  2100          ]
  2101        }
  2102      ]
  2103    },
  2104    {
  2105      "description": "timeoutMS can be set to 0 on a MongoClient - estimatedDocumentCount on collection",
  2106      "operations": [
  2107        {
  2108          "name": "createEntities",
  2109          "object": "testRunner",
  2110          "arguments": {
  2111            "entities": [
  2112              {
  2113                "client": {
  2114                  "id": "client",
  2115                  "uriOptions": {
  2116                    "timeoutMS": 0
  2117                  },
  2118                  "useMultipleMongoses": false,
  2119                  "observeEvents": [
  2120                    "commandStartedEvent"
  2121                  ],
  2122                  "ignoreCommandMonitoringEvents": [
  2123                    "killCursors"
  2124                  ]
  2125                }
  2126              },
  2127              {
  2128                "database": {
  2129                  "id": "database",
  2130                  "client": "client",
  2131                  "databaseName": "test"
  2132                }
  2133              },
  2134              {
  2135                "collection": {
  2136                  "id": "collection",
  2137                  "database": "database",
  2138                  "collectionName": "coll"
  2139                }
  2140              }
  2141            ]
  2142          }
  2143        },
  2144        {
  2145          "name": "failPoint",
  2146          "object": "testRunner",
  2147          "arguments": {
  2148            "client": "failPointClient",
  2149            "failPoint": {
  2150              "configureFailPoint": "failCommand",
  2151              "mode": {
  2152                "times": 1
  2153              },
  2154              "data": {
  2155                "failCommands": [
  2156                  "count"
  2157                ],
  2158                "blockConnection": true,
  2159                "blockTimeMS": 15
  2160              }
  2161            }
  2162          }
  2163        },
  2164        {
  2165          "name": "estimatedDocumentCount",
  2166          "object": "collection"
  2167        }
  2168      ],
  2169      "expectEvents": [
  2170        {
  2171          "client": "client",
  2172          "events": [
  2173            {
  2174              "commandStartedEvent": {
  2175                "commandName": "count",
  2176                "databaseName": "test",
  2177                "command": {
  2178                  "count": "coll",
  2179                  "maxTimeMS": {
  2180                    "$$exists": false
  2181                  }
  2182                }
  2183              }
  2184            }
  2185          ]
  2186        }
  2187      ]
  2188    },
  2189    {
  2190      "description": "timeoutMS can be configured on a MongoClient - distinct on collection",
  2191      "operations": [
  2192        {
  2193          "name": "createEntities",
  2194          "object": "testRunner",
  2195          "arguments": {
  2196            "entities": [
  2197              {
  2198                "client": {
  2199                  "id": "client",
  2200                  "uriOptions": {
  2201                    "timeoutMS": 50
  2202                  },
  2203                  "useMultipleMongoses": false,
  2204                  "observeEvents": [
  2205                    "commandStartedEvent"
  2206                  ]
  2207                }
  2208              },
  2209              {
  2210                "database": {
  2211                  "id": "database",
  2212                  "client": "client",
  2213                  "databaseName": "test"
  2214                }
  2215              },
  2216              {
  2217                "collection": {
  2218                  "id": "collection",
  2219                  "database": "database",
  2220                  "collectionName": "coll"
  2221                }
  2222              }
  2223            ]
  2224          }
  2225        },
  2226        {
  2227          "name": "failPoint",
  2228          "object": "testRunner",
  2229          "arguments": {
  2230            "client": "failPointClient",
  2231            "failPoint": {
  2232              "configureFailPoint": "failCommand",
  2233              "mode": {
  2234                "times": 1
  2235              },
  2236              "data": {
  2237                "failCommands": [
  2238                  "distinct"
  2239                ],
  2240                "blockConnection": true,
  2241                "blockTimeMS": 60
  2242              }
  2243            }
  2244          }
  2245        },
  2246        {
  2247          "name": "distinct",
  2248          "object": "collection",
  2249          "arguments": {
  2250            "fieldName": "x",
  2251            "filter": {}
  2252          },
  2253          "expectError": {
  2254            "isTimeoutError": true
  2255          }
  2256        }
  2257      ],
  2258      "expectEvents": [
  2259        {
  2260          "client": "client",
  2261          "events": [
  2262            {
  2263              "commandStartedEvent": {
  2264                "commandName": "distinct",
  2265                "databaseName": "test",
  2266                "command": {
  2267                  "distinct": "coll",
  2268                  "maxTimeMS": {
  2269                    "$$type": [
  2270                      "int",
  2271                      "long"
  2272                    ]
  2273                  }
  2274                }
  2275              }
  2276            }
  2277          ]
  2278        }
  2279      ]
  2280    },
  2281    {
  2282      "description": "timeoutMS can be set to 0 on a MongoClient - distinct on collection",
  2283      "operations": [
  2284        {
  2285          "name": "createEntities",
  2286          "object": "testRunner",
  2287          "arguments": {
  2288            "entities": [
  2289              {
  2290                "client": {
  2291                  "id": "client",
  2292                  "uriOptions": {
  2293                    "timeoutMS": 0
  2294                  },
  2295                  "useMultipleMongoses": false,
  2296                  "observeEvents": [
  2297                    "commandStartedEvent"
  2298                  ],
  2299                  "ignoreCommandMonitoringEvents": [
  2300                    "killCursors"
  2301                  ]
  2302                }
  2303              },
  2304              {
  2305                "database": {
  2306                  "id": "database",
  2307                  "client": "client",
  2308                  "databaseName": "test"
  2309                }
  2310              },
  2311              {
  2312                "collection": {
  2313                  "id": "collection",
  2314                  "database": "database",
  2315                  "collectionName": "coll"
  2316                }
  2317              }
  2318            ]
  2319          }
  2320        },
  2321        {
  2322          "name": "failPoint",
  2323          "object": "testRunner",
  2324          "arguments": {
  2325            "client": "failPointClient",
  2326            "failPoint": {
  2327              "configureFailPoint": "failCommand",
  2328              "mode": {
  2329                "times": 1
  2330              },
  2331              "data": {
  2332                "failCommands": [
  2333                  "distinct"
  2334                ],
  2335                "blockConnection": true,
  2336                "blockTimeMS": 15
  2337              }
  2338            }
  2339          }
  2340        },
  2341        {
  2342          "name": "distinct",
  2343          "object": "collection",
  2344          "arguments": {
  2345            "fieldName": "x",
  2346            "filter": {}
  2347          }
  2348        }
  2349      ],
  2350      "expectEvents": [
  2351        {
  2352          "client": "client",
  2353          "events": [
  2354            {
  2355              "commandStartedEvent": {
  2356                "commandName": "distinct",
  2357                "databaseName": "test",
  2358                "command": {
  2359                  "distinct": "coll",
  2360                  "maxTimeMS": {
  2361                    "$$exists": false
  2362                  }
  2363                }
  2364              }
  2365            }
  2366          ]
  2367        }
  2368      ]
  2369    },
  2370    {
  2371      "description": "timeoutMS can be configured on a MongoClient - find on collection",
  2372      "operations": [
  2373        {
  2374          "name": "createEntities",
  2375          "object": "testRunner",
  2376          "arguments": {
  2377            "entities": [
  2378              {
  2379                "client": {
  2380                  "id": "client",
  2381                  "uriOptions": {
  2382                    "timeoutMS": 50
  2383                  },
  2384                  "useMultipleMongoses": false,
  2385                  "observeEvents": [
  2386                    "commandStartedEvent"
  2387                  ]
  2388                }
  2389              },
  2390              {
  2391                "database": {
  2392                  "id": "database",
  2393                  "client": "client",
  2394                  "databaseName": "test"
  2395                }
  2396              },
  2397              {
  2398                "collection": {
  2399                  "id": "collection",
  2400                  "database": "database",
  2401                  "collectionName": "coll"
  2402                }
  2403              }
  2404            ]
  2405          }
  2406        },
  2407        {
  2408          "name": "failPoint",
  2409          "object": "testRunner",
  2410          "arguments": {
  2411            "client": "failPointClient",
  2412            "failPoint": {
  2413              "configureFailPoint": "failCommand",
  2414              "mode": {
  2415                "times": 1
  2416              },
  2417              "data": {
  2418                "failCommands": [
  2419                  "find"
  2420                ],
  2421                "blockConnection": true,
  2422                "blockTimeMS": 60
  2423              }
  2424            }
  2425          }
  2426        },
  2427        {
  2428          "name": "find",
  2429          "object": "collection",
  2430          "arguments": {
  2431            "filter": {}
  2432          },
  2433          "expectError": {
  2434            "isTimeoutError": true
  2435          }
  2436        }
  2437      ],
  2438      "expectEvents": [
  2439        {
  2440          "client": "client",
  2441          "events": [
  2442            {
  2443              "commandStartedEvent": {
  2444                "commandName": "find",
  2445                "databaseName": "test",
  2446                "command": {
  2447                  "find": "coll",
  2448                  "maxTimeMS": {
  2449                    "$$type": [
  2450                      "int",
  2451                      "long"
  2452                    ]
  2453                  }
  2454                }
  2455              }
  2456            }
  2457          ]
  2458        }
  2459      ]
  2460    },
  2461    {
  2462      "description": "timeoutMS can be set to 0 on a MongoClient - find on collection",
  2463      "operations": [
  2464        {
  2465          "name": "createEntities",
  2466          "object": "testRunner",
  2467          "arguments": {
  2468            "entities": [
  2469              {
  2470                "client": {
  2471                  "id": "client",
  2472                  "uriOptions": {
  2473                    "timeoutMS": 0
  2474                  },
  2475                  "useMultipleMongoses": false,
  2476                  "observeEvents": [
  2477                    "commandStartedEvent"
  2478                  ],
  2479                  "ignoreCommandMonitoringEvents": [
  2480                    "killCursors"
  2481                  ]
  2482                }
  2483              },
  2484              {
  2485                "database": {
  2486                  "id": "database",
  2487                  "client": "client",
  2488                  "databaseName": "test"
  2489                }
  2490              },
  2491              {
  2492                "collection": {
  2493                  "id": "collection",
  2494                  "database": "database",
  2495                  "collectionName": "coll"
  2496                }
  2497              }
  2498            ]
  2499          }
  2500        },
  2501        {
  2502          "name": "failPoint",
  2503          "object": "testRunner",
  2504          "arguments": {
  2505            "client": "failPointClient",
  2506            "failPoint": {
  2507              "configureFailPoint": "failCommand",
  2508              "mode": {
  2509                "times": 1
  2510              },
  2511              "data": {
  2512                "failCommands": [
  2513                  "find"
  2514                ],
  2515                "blockConnection": true,
  2516                "blockTimeMS": 15
  2517              }
  2518            }
  2519          }
  2520        },
  2521        {
  2522          "name": "find",
  2523          "object": "collection",
  2524          "arguments": {
  2525            "filter": {}
  2526          }
  2527        }
  2528      ],
  2529      "expectEvents": [
  2530        {
  2531          "client": "client",
  2532          "events": [
  2533            {
  2534              "commandStartedEvent": {
  2535                "commandName": "find",
  2536                "databaseName": "test",
  2537                "command": {
  2538                  "find": "coll",
  2539                  "maxTimeMS": {
  2540                    "$$exists": false
  2541                  }
  2542                }
  2543              }
  2544            }
  2545          ]
  2546        }
  2547      ]
  2548    },
  2549    {
  2550      "description": "timeoutMS can be configured on a MongoClient - findOne on collection",
  2551      "operations": [
  2552        {
  2553          "name": "createEntities",
  2554          "object": "testRunner",
  2555          "arguments": {
  2556            "entities": [
  2557              {
  2558                "client": {
  2559                  "id": "client",
  2560                  "uriOptions": {
  2561                    "timeoutMS": 50
  2562                  },
  2563                  "useMultipleMongoses": false,
  2564                  "observeEvents": [
  2565                    "commandStartedEvent"
  2566                  ]
  2567                }
  2568              },
  2569              {
  2570                "database": {
  2571                  "id": "database",
  2572                  "client": "client",
  2573                  "databaseName": "test"
  2574                }
  2575              },
  2576              {
  2577                "collection": {
  2578                  "id": "collection",
  2579                  "database": "database",
  2580                  "collectionName": "coll"
  2581                }
  2582              }
  2583            ]
  2584          }
  2585        },
  2586        {
  2587          "name": "failPoint",
  2588          "object": "testRunner",
  2589          "arguments": {
  2590            "client": "failPointClient",
  2591            "failPoint": {
  2592              "configureFailPoint": "failCommand",
  2593              "mode": {
  2594                "times": 1
  2595              },
  2596              "data": {
  2597                "failCommands": [
  2598                  "find"
  2599                ],
  2600                "blockConnection": true,
  2601                "blockTimeMS": 60
  2602              }
  2603            }
  2604          }
  2605        },
  2606        {
  2607          "name": "findOne",
  2608          "object": "collection",
  2609          "arguments": {
  2610            "filter": {}
  2611          },
  2612          "expectError": {
  2613            "isTimeoutError": true
  2614          }
  2615        }
  2616      ],
  2617      "expectEvents": [
  2618        {
  2619          "client": "client",
  2620          "events": [
  2621            {
  2622              "commandStartedEvent": {
  2623                "commandName": "find",
  2624                "databaseName": "test",
  2625                "command": {
  2626                  "find": "coll",
  2627                  "maxTimeMS": {
  2628                    "$$type": [
  2629                      "int",
  2630                      "long"
  2631                    ]
  2632                  }
  2633                }
  2634              }
  2635            }
  2636          ]
  2637        }
  2638      ]
  2639    },
  2640    {
  2641      "description": "timeoutMS can be set to 0 on a MongoClient - findOne on collection",
  2642      "operations": [
  2643        {
  2644          "name": "createEntities",
  2645          "object": "testRunner",
  2646          "arguments": {
  2647            "entities": [
  2648              {
  2649                "client": {
  2650                  "id": "client",
  2651                  "uriOptions": {
  2652                    "timeoutMS": 0
  2653                  },
  2654                  "useMultipleMongoses": false,
  2655                  "observeEvents": [
  2656                    "commandStartedEvent"
  2657                  ],
  2658                  "ignoreCommandMonitoringEvents": [
  2659                    "killCursors"
  2660                  ]
  2661                }
  2662              },
  2663              {
  2664                "database": {
  2665                  "id": "database",
  2666                  "client": "client",
  2667                  "databaseName": "test"
  2668                }
  2669              },
  2670              {
  2671                "collection": {
  2672                  "id": "collection",
  2673                  "database": "database",
  2674                  "collectionName": "coll"
  2675                }
  2676              }
  2677            ]
  2678          }
  2679        },
  2680        {
  2681          "name": "failPoint",
  2682          "object": "testRunner",
  2683          "arguments": {
  2684            "client": "failPointClient",
  2685            "failPoint": {
  2686              "configureFailPoint": "failCommand",
  2687              "mode": {
  2688                "times": 1
  2689              },
  2690              "data": {
  2691                "failCommands": [
  2692                  "find"
  2693                ],
  2694                "blockConnection": true,
  2695                "blockTimeMS": 15
  2696              }
  2697            }
  2698          }
  2699        },
  2700        {
  2701          "name": "findOne",
  2702          "object": "collection",
  2703          "arguments": {
  2704            "filter": {}
  2705          }
  2706        }
  2707      ],
  2708      "expectEvents": [
  2709        {
  2710          "client": "client",
  2711          "events": [
  2712            {
  2713              "commandStartedEvent": {
  2714                "commandName": "find",
  2715                "databaseName": "test",
  2716                "command": {
  2717                  "find": "coll",
  2718                  "maxTimeMS": {
  2719                    "$$exists": false
  2720                  }
  2721                }
  2722              }
  2723            }
  2724          ]
  2725        }
  2726      ]
  2727    },
  2728    {
  2729      "description": "timeoutMS can be configured on a MongoClient - listIndexes on collection",
  2730      "operations": [
  2731        {
  2732          "name": "createEntities",
  2733          "object": "testRunner",
  2734          "arguments": {
  2735            "entities": [
  2736              {
  2737                "client": {
  2738                  "id": "client",
  2739                  "uriOptions": {
  2740                    "timeoutMS": 50
  2741                  },
  2742                  "useMultipleMongoses": false,
  2743                  "observeEvents": [
  2744                    "commandStartedEvent"
  2745                  ]
  2746                }
  2747              },
  2748              {
  2749                "database": {
  2750                  "id": "database",
  2751                  "client": "client",
  2752                  "databaseName": "test"
  2753                }
  2754              },
  2755              {
  2756                "collection": {
  2757                  "id": "collection",
  2758                  "database": "database",
  2759                  "collectionName": "coll"
  2760                }
  2761              }
  2762            ]
  2763          }
  2764        },
  2765        {
  2766          "name": "failPoint",
  2767          "object": "testRunner",
  2768          "arguments": {
  2769            "client": "failPointClient",
  2770            "failPoint": {
  2771              "configureFailPoint": "failCommand",
  2772              "mode": {
  2773                "times": 1
  2774              },
  2775              "data": {
  2776                "failCommands": [
  2777                  "listIndexes"
  2778                ],
  2779                "blockConnection": true,
  2780                "blockTimeMS": 60
  2781              }
  2782            }
  2783          }
  2784        },
  2785        {
  2786          "name": "listIndexes",
  2787          "object": "collection",
  2788          "expectError": {
  2789            "isTimeoutError": true
  2790          }
  2791        }
  2792      ],
  2793      "expectEvents": [
  2794        {
  2795          "client": "client",
  2796          "events": [
  2797            {
  2798              "commandStartedEvent": {
  2799                "commandName": "listIndexes",
  2800                "databaseName": "test",
  2801                "command": {
  2802                  "listIndexes": "coll",
  2803                  "maxTimeMS": {
  2804                    "$$type": [
  2805                      "int",
  2806                      "long"
  2807                    ]
  2808                  }
  2809                }
  2810              }
  2811            }
  2812          ]
  2813        }
  2814      ]
  2815    },
  2816    {
  2817      "description": "timeoutMS can be set to 0 on a MongoClient - listIndexes on collection",
  2818      "operations": [
  2819        {
  2820          "name": "createEntities",
  2821          "object": "testRunner",
  2822          "arguments": {
  2823            "entities": [
  2824              {
  2825                "client": {
  2826                  "id": "client",
  2827                  "uriOptions": {
  2828                    "timeoutMS": 0
  2829                  },
  2830                  "useMultipleMongoses": false,
  2831                  "observeEvents": [
  2832                    "commandStartedEvent"
  2833                  ],
  2834                  "ignoreCommandMonitoringEvents": [
  2835                    "killCursors"
  2836                  ]
  2837                }
  2838              },
  2839              {
  2840                "database": {
  2841                  "id": "database",
  2842                  "client": "client",
  2843                  "databaseName": "test"
  2844                }
  2845              },
  2846              {
  2847                "collection": {
  2848                  "id": "collection",
  2849                  "database": "database",
  2850                  "collectionName": "coll"
  2851                }
  2852              }
  2853            ]
  2854          }
  2855        },
  2856        {
  2857          "name": "failPoint",
  2858          "object": "testRunner",
  2859          "arguments": {
  2860            "client": "failPointClient",
  2861            "failPoint": {
  2862              "configureFailPoint": "failCommand",
  2863              "mode": {
  2864                "times": 1
  2865              },
  2866              "data": {
  2867                "failCommands": [
  2868                  "listIndexes"
  2869                ],
  2870                "blockConnection": true,
  2871                "blockTimeMS": 15
  2872              }
  2873            }
  2874          }
  2875        },
  2876        {
  2877          "name": "listIndexes",
  2878          "object": "collection"
  2879        }
  2880      ],
  2881      "expectEvents": [
  2882        {
  2883          "client": "client",
  2884          "events": [
  2885            {
  2886              "commandStartedEvent": {
  2887                "commandName": "listIndexes",
  2888                "databaseName": "test",
  2889                "command": {
  2890                  "listIndexes": "coll",
  2891                  "maxTimeMS": {
  2892                    "$$exists": false
  2893                  }
  2894                }
  2895              }
  2896            }
  2897          ]
  2898        }
  2899      ]
  2900    },
  2901    {
  2902      "description": "timeoutMS can be configured on a MongoClient - listIndexNames on collection",
  2903      "operations": [
  2904        {
  2905          "name": "createEntities",
  2906          "object": "testRunner",
  2907          "arguments": {
  2908            "entities": [
  2909              {
  2910                "client": {
  2911                  "id": "client",
  2912                  "uriOptions": {
  2913                    "timeoutMS": 50
  2914                  },
  2915                  "useMultipleMongoses": false,
  2916                  "observeEvents": [
  2917                    "commandStartedEvent"
  2918                  ]
  2919                }
  2920              },
  2921              {
  2922                "database": {
  2923                  "id": "database",
  2924                  "client": "client",
  2925                  "databaseName": "test"
  2926                }
  2927              },
  2928              {
  2929                "collection": {
  2930                  "id": "collection",
  2931                  "database": "database",
  2932                  "collectionName": "coll"
  2933                }
  2934              }
  2935            ]
  2936          }
  2937        },
  2938        {
  2939          "name": "failPoint",
  2940          "object": "testRunner",
  2941          "arguments": {
  2942            "client": "failPointClient",
  2943            "failPoint": {
  2944              "configureFailPoint": "failCommand",
  2945              "mode": {
  2946                "times": 1
  2947              },
  2948              "data": {
  2949                "failCommands": [
  2950                  "listIndexes"
  2951                ],
  2952                "blockConnection": true,
  2953                "blockTimeMS": 60
  2954              }
  2955            }
  2956          }
  2957        },
  2958        {
  2959          "name": "listIndexNames",
  2960          "object": "collection",
  2961          "expectError": {
  2962            "isTimeoutError": true
  2963          }
  2964        }
  2965      ],
  2966      "expectEvents": [
  2967        {
  2968          "client": "client",
  2969          "events": [
  2970            {
  2971              "commandStartedEvent": {
  2972                "commandName": "listIndexes",
  2973                "databaseName": "test",
  2974                "command": {
  2975                  "listIndexes": "coll",
  2976                  "maxTimeMS": {
  2977                    "$$type": [
  2978                      "int",
  2979                      "long"
  2980                    ]
  2981                  }
  2982                }
  2983              }
  2984            }
  2985          ]
  2986        }
  2987      ]
  2988    },
  2989    {
  2990      "description": "timeoutMS can be set to 0 on a MongoClient - listIndexNames on collection",
  2991      "operations": [
  2992        {
  2993          "name": "createEntities",
  2994          "object": "testRunner",
  2995          "arguments": {
  2996            "entities": [
  2997              {
  2998                "client": {
  2999                  "id": "client",
  3000                  "uriOptions": {
  3001                    "timeoutMS": 0
  3002                  },
  3003                  "useMultipleMongoses": false,
  3004                  "observeEvents": [
  3005                    "commandStartedEvent"
  3006                  ],
  3007                  "ignoreCommandMonitoringEvents": [
  3008                    "killCursors"
  3009                  ]
  3010                }
  3011              },
  3012              {
  3013                "database": {
  3014                  "id": "database",
  3015                  "client": "client",
  3016                  "databaseName": "test"
  3017                }
  3018              },
  3019              {
  3020                "collection": {
  3021                  "id": "collection",
  3022                  "database": "database",
  3023                  "collectionName": "coll"
  3024                }
  3025              }
  3026            ]
  3027          }
  3028        },
  3029        {
  3030          "name": "failPoint",
  3031          "object": "testRunner",
  3032          "arguments": {
  3033            "client": "failPointClient",
  3034            "failPoint": {
  3035              "configureFailPoint": "failCommand",
  3036              "mode": {
  3037                "times": 1
  3038              },
  3039              "data": {
  3040                "failCommands": [
  3041                  "listIndexes"
  3042                ],
  3043                "blockConnection": true,
  3044                "blockTimeMS": 15
  3045              }
  3046            }
  3047          }
  3048        },
  3049        {
  3050          "name": "listIndexNames",
  3051          "object": "collection"
  3052        }
  3053      ],
  3054      "expectEvents": [
  3055        {
  3056          "client": "client",
  3057          "events": [
  3058            {
  3059              "commandStartedEvent": {
  3060                "commandName": "listIndexes",
  3061                "databaseName": "test",
  3062                "command": {
  3063                  "listIndexes": "coll",
  3064                  "maxTimeMS": {
  3065                    "$$exists": false
  3066                  }
  3067                }
  3068              }
  3069            }
  3070          ]
  3071        }
  3072      ]
  3073    },
  3074    {
  3075      "description": "timeoutMS can be configured on a MongoClient - createChangeStream on collection",
  3076      "operations": [
  3077        {
  3078          "name": "createEntities",
  3079          "object": "testRunner",
  3080          "arguments": {
  3081            "entities": [
  3082              {
  3083                "client": {
  3084                  "id": "client",
  3085                  "uriOptions": {
  3086                    "timeoutMS": 50
  3087                  },
  3088                  "useMultipleMongoses": false,
  3089                  "observeEvents": [
  3090                    "commandStartedEvent"
  3091                  ]
  3092                }
  3093              },
  3094              {
  3095                "database": {
  3096                  "id": "database",
  3097                  "client": "client",
  3098                  "databaseName": "test"
  3099                }
  3100              },
  3101              {
  3102                "collection": {
  3103                  "id": "collection",
  3104                  "database": "database",
  3105                  "collectionName": "coll"
  3106                }
  3107              }
  3108            ]
  3109          }
  3110        },
  3111        {
  3112          "name": "failPoint",
  3113          "object": "testRunner",
  3114          "arguments": {
  3115            "client": "failPointClient",
  3116            "failPoint": {
  3117              "configureFailPoint": "failCommand",
  3118              "mode": {
  3119                "times": 1
  3120              },
  3121              "data": {
  3122                "failCommands": [
  3123                  "aggregate"
  3124                ],
  3125                "blockConnection": true,
  3126                "blockTimeMS": 60
  3127              }
  3128            }
  3129          }
  3130        },
  3131        {
  3132          "name": "createChangeStream",
  3133          "object": "collection",
  3134          "arguments": {
  3135            "pipeline": []
  3136          },
  3137          "expectError": {
  3138            "isTimeoutError": true
  3139          }
  3140        }
  3141      ],
  3142      "expectEvents": [
  3143        {
  3144          "client": "client",
  3145          "events": [
  3146            {
  3147              "commandStartedEvent": {
  3148                "commandName": "aggregate",
  3149                "databaseName": "test",
  3150                "command": {
  3151                  "aggregate": "coll",
  3152                  "maxTimeMS": {
  3153                    "$$type": [
  3154                      "int",
  3155                      "long"
  3156                    ]
  3157                  }
  3158                }
  3159              }
  3160            }
  3161          ]
  3162        }
  3163      ]
  3164    },
  3165    {
  3166      "description": "timeoutMS can be set to 0 on a MongoClient - createChangeStream on collection",
  3167      "operations": [
  3168        {
  3169          "name": "createEntities",
  3170          "object": "testRunner",
  3171          "arguments": {
  3172            "entities": [
  3173              {
  3174                "client": {
  3175                  "id": "client",
  3176                  "uriOptions": {
  3177                    "timeoutMS": 0
  3178                  },
  3179                  "useMultipleMongoses": false,
  3180                  "observeEvents": [
  3181                    "commandStartedEvent"
  3182                  ],
  3183                  "ignoreCommandMonitoringEvents": [
  3184                    "killCursors"
  3185                  ]
  3186                }
  3187              },
  3188              {
  3189                "database": {
  3190                  "id": "database",
  3191                  "client": "client",
  3192                  "databaseName": "test"
  3193                }
  3194              },
  3195              {
  3196                "collection": {
  3197                  "id": "collection",
  3198                  "database": "database",
  3199                  "collectionName": "coll"
  3200                }
  3201              }
  3202            ]
  3203          }
  3204        },
  3205        {
  3206          "name": "failPoint",
  3207          "object": "testRunner",
  3208          "arguments": {
  3209            "client": "failPointClient",
  3210            "failPoint": {
  3211              "configureFailPoint": "failCommand",
  3212              "mode": {
  3213                "times": 1
  3214              },
  3215              "data": {
  3216                "failCommands": [
  3217                  "aggregate"
  3218                ],
  3219                "blockConnection": true,
  3220                "blockTimeMS": 15
  3221              }
  3222            }
  3223          }
  3224        },
  3225        {
  3226          "name": "createChangeStream",
  3227          "object": "collection",
  3228          "arguments": {
  3229            "pipeline": []
  3230          }
  3231        }
  3232      ],
  3233      "expectEvents": [
  3234        {
  3235          "client": "client",
  3236          "events": [
  3237            {
  3238              "commandStartedEvent": {
  3239                "commandName": "aggregate",
  3240                "databaseName": "test",
  3241                "command": {
  3242                  "aggregate": "coll",
  3243                  "maxTimeMS": {
  3244                    "$$exists": false
  3245                  }
  3246                }
  3247              }
  3248            }
  3249          ]
  3250        }
  3251      ]
  3252    },
  3253    {
  3254      "description": "timeoutMS can be configured on a MongoClient - insertOne on collection",
  3255      "operations": [
  3256        {
  3257          "name": "createEntities",
  3258          "object": "testRunner",
  3259          "arguments": {
  3260            "entities": [
  3261              {
  3262                "client": {
  3263                  "id": "client",
  3264                  "uriOptions": {
  3265                    "timeoutMS": 50
  3266                  },
  3267                  "useMultipleMongoses": false,
  3268                  "observeEvents": [
  3269                    "commandStartedEvent"
  3270                  ]
  3271                }
  3272              },
  3273              {
  3274                "database": {
  3275                  "id": "database",
  3276                  "client": "client",
  3277                  "databaseName": "test"
  3278                }
  3279              },
  3280              {
  3281                "collection": {
  3282                  "id": "collection",
  3283                  "database": "database",
  3284                  "collectionName": "coll"
  3285                }
  3286              }
  3287            ]
  3288          }
  3289        },
  3290        {
  3291          "name": "failPoint",
  3292          "object": "testRunner",
  3293          "arguments": {
  3294            "client": "failPointClient",
  3295            "failPoint": {
  3296              "configureFailPoint": "failCommand",
  3297              "mode": {
  3298                "times": 1
  3299              },
  3300              "data": {
  3301                "failCommands": [
  3302                  "insert"
  3303                ],
  3304                "blockConnection": true,
  3305                "blockTimeMS": 60
  3306              }
  3307            }
  3308          }
  3309        },
  3310        {
  3311          "name": "insertOne",
  3312          "object": "collection",
  3313          "arguments": {
  3314            "document": {
  3315              "x": 1
  3316            }
  3317          },
  3318          "expectError": {
  3319            "isTimeoutError": true
  3320          }
  3321        }
  3322      ],
  3323      "expectEvents": [
  3324        {
  3325          "client": "client",
  3326          "events": [
  3327            {
  3328              "commandStartedEvent": {
  3329                "commandName": "insert",
  3330                "databaseName": "test",
  3331                "command": {
  3332                  "insert": "coll",
  3333                  "maxTimeMS": {
  3334                    "$$type": [
  3335                      "int",
  3336                      "long"
  3337                    ]
  3338                  }
  3339                }
  3340              }
  3341            }
  3342          ]
  3343        }
  3344      ]
  3345    },
  3346    {
  3347      "description": "timeoutMS can be set to 0 on a MongoClient - insertOne on collection",
  3348      "operations": [
  3349        {
  3350          "name": "createEntities",
  3351          "object": "testRunner",
  3352          "arguments": {
  3353            "entities": [
  3354              {
  3355                "client": {
  3356                  "id": "client",
  3357                  "uriOptions": {
  3358                    "timeoutMS": 0
  3359                  },
  3360                  "useMultipleMongoses": false,
  3361                  "observeEvents": [
  3362                    "commandStartedEvent"
  3363                  ],
  3364                  "ignoreCommandMonitoringEvents": [
  3365                    "killCursors"
  3366                  ]
  3367                }
  3368              },
  3369              {
  3370                "database": {
  3371                  "id": "database",
  3372                  "client": "client",
  3373                  "databaseName": "test"
  3374                }
  3375              },
  3376              {
  3377                "collection": {
  3378                  "id": "collection",
  3379                  "database": "database",
  3380                  "collectionName": "coll"
  3381                }
  3382              }
  3383            ]
  3384          }
  3385        },
  3386        {
  3387          "name": "failPoint",
  3388          "object": "testRunner",
  3389          "arguments": {
  3390            "client": "failPointClient",
  3391            "failPoint": {
  3392              "configureFailPoint": "failCommand",
  3393              "mode": {
  3394                "times": 1
  3395              },
  3396              "data": {
  3397                "failCommands": [
  3398                  "insert"
  3399                ],
  3400                "blockConnection": true,
  3401                "blockTimeMS": 15
  3402              }
  3403            }
  3404          }
  3405        },
  3406        {
  3407          "name": "insertOne",
  3408          "object": "collection",
  3409          "arguments": {
  3410            "document": {
  3411              "x": 1
  3412            }
  3413          }
  3414        }
  3415      ],
  3416      "expectEvents": [
  3417        {
  3418          "client": "client",
  3419          "events": [
  3420            {
  3421              "commandStartedEvent": {
  3422                "commandName": "insert",
  3423                "databaseName": "test",
  3424                "command": {
  3425                  "insert": "coll",
  3426                  "maxTimeMS": {
  3427                    "$$exists": false
  3428                  }
  3429                }
  3430              }
  3431            }
  3432          ]
  3433        }
  3434      ]
  3435    },
  3436    {
  3437      "description": "timeoutMS can be configured on a MongoClient - insertMany on collection",
  3438      "operations": [
  3439        {
  3440          "name": "createEntities",
  3441          "object": "testRunner",
  3442          "arguments": {
  3443            "entities": [
  3444              {
  3445                "client": {
  3446                  "id": "client",
  3447                  "uriOptions": {
  3448                    "timeoutMS": 50
  3449                  },
  3450                  "useMultipleMongoses": false,
  3451                  "observeEvents": [
  3452                    "commandStartedEvent"
  3453                  ]
  3454                }
  3455              },
  3456              {
  3457                "database": {
  3458                  "id": "database",
  3459                  "client": "client",
  3460                  "databaseName": "test"
  3461                }
  3462              },
  3463              {
  3464                "collection": {
  3465                  "id": "collection",
  3466                  "database": "database",
  3467                  "collectionName": "coll"
  3468                }
  3469              }
  3470            ]
  3471          }
  3472        },
  3473        {
  3474          "name": "failPoint",
  3475          "object": "testRunner",
  3476          "arguments": {
  3477            "client": "failPointClient",
  3478            "failPoint": {
  3479              "configureFailPoint": "failCommand",
  3480              "mode": {
  3481                "times": 1
  3482              },
  3483              "data": {
  3484                "failCommands": [
  3485                  "insert"
  3486                ],
  3487                "blockConnection": true,
  3488                "blockTimeMS": 60
  3489              }
  3490            }
  3491          }
  3492        },
  3493        {
  3494          "name": "insertMany",
  3495          "object": "collection",
  3496          "arguments": {
  3497            "documents": [
  3498              {
  3499                "x": 1
  3500              }
  3501            ]
  3502          },
  3503          "expectError": {
  3504            "isTimeoutError": true
  3505          }
  3506        }
  3507      ],
  3508      "expectEvents": [
  3509        {
  3510          "client": "client",
  3511          "events": [
  3512            {
  3513              "commandStartedEvent": {
  3514                "commandName": "insert",
  3515                "databaseName": "test",
  3516                "command": {
  3517                  "insert": "coll",
  3518                  "maxTimeMS": {
  3519                    "$$type": [
  3520                      "int",
  3521                      "long"
  3522                    ]
  3523                  }
  3524                }
  3525              }
  3526            }
  3527          ]
  3528        }
  3529      ]
  3530    },
  3531    {
  3532      "description": "timeoutMS can be set to 0 on a MongoClient - insertMany on collection",
  3533      "operations": [
  3534        {
  3535          "name": "createEntities",
  3536          "object": "testRunner",
  3537          "arguments": {
  3538            "entities": [
  3539              {
  3540                "client": {
  3541                  "id": "client",
  3542                  "uriOptions": {
  3543                    "timeoutMS": 0
  3544                  },
  3545                  "useMultipleMongoses": false,
  3546                  "observeEvents": [
  3547                    "commandStartedEvent"
  3548                  ],
  3549                  "ignoreCommandMonitoringEvents": [
  3550                    "killCursors"
  3551                  ]
  3552                }
  3553              },
  3554              {
  3555                "database": {
  3556                  "id": "database",
  3557                  "client": "client",
  3558                  "databaseName": "test"
  3559                }
  3560              },
  3561              {
  3562                "collection": {
  3563                  "id": "collection",
  3564                  "database": "database",
  3565                  "collectionName": "coll"
  3566                }
  3567              }
  3568            ]
  3569          }
  3570        },
  3571        {
  3572          "name": "failPoint",
  3573          "object": "testRunner",
  3574          "arguments": {
  3575            "client": "failPointClient",
  3576            "failPoint": {
  3577              "configureFailPoint": "failCommand",
  3578              "mode": {
  3579                "times": 1
  3580              },
  3581              "data": {
  3582                "failCommands": [
  3583                  "insert"
  3584                ],
  3585                "blockConnection": true,
  3586                "blockTimeMS": 15
  3587              }
  3588            }
  3589          }
  3590        },
  3591        {
  3592          "name": "insertMany",
  3593          "object": "collection",
  3594          "arguments": {
  3595            "documents": [
  3596              {
  3597                "x": 1
  3598              }
  3599            ]
  3600          }
  3601        }
  3602      ],
  3603      "expectEvents": [
  3604        {
  3605          "client": "client",
  3606          "events": [
  3607            {
  3608              "commandStartedEvent": {
  3609                "commandName": "insert",
  3610                "databaseName": "test",
  3611                "command": {
  3612                  "insert": "coll",
  3613                  "maxTimeMS": {
  3614                    "$$exists": false
  3615                  }
  3616                }
  3617              }
  3618            }
  3619          ]
  3620        }
  3621      ]
  3622    },
  3623    {
  3624      "description": "timeoutMS can be configured on a MongoClient - deleteOne on collection",
  3625      "operations": [
  3626        {
  3627          "name": "createEntities",
  3628          "object": "testRunner",
  3629          "arguments": {
  3630            "entities": [
  3631              {
  3632                "client": {
  3633                  "id": "client",
  3634                  "uriOptions": {
  3635                    "timeoutMS": 50
  3636                  },
  3637                  "useMultipleMongoses": false,
  3638                  "observeEvents": [
  3639                    "commandStartedEvent"
  3640                  ]
  3641                }
  3642              },
  3643              {
  3644                "database": {
  3645                  "id": "database",
  3646                  "client": "client",
  3647                  "databaseName": "test"
  3648                }
  3649              },
  3650              {
  3651                "collection": {
  3652                  "id": "collection",
  3653                  "database": "database",
  3654                  "collectionName": "coll"
  3655                }
  3656              }
  3657            ]
  3658          }
  3659        },
  3660        {
  3661          "name": "failPoint",
  3662          "object": "testRunner",
  3663          "arguments": {
  3664            "client": "failPointClient",
  3665            "failPoint": {
  3666              "configureFailPoint": "failCommand",
  3667              "mode": {
  3668                "times": 1
  3669              },
  3670              "data": {
  3671                "failCommands": [
  3672                  "delete"
  3673                ],
  3674                "blockConnection": true,
  3675                "blockTimeMS": 60
  3676              }
  3677            }
  3678          }
  3679        },
  3680        {
  3681          "name": "deleteOne",
  3682          "object": "collection",
  3683          "arguments": {
  3684            "filter": {}
  3685          },
  3686          "expectError": {
  3687            "isTimeoutError": true
  3688          }
  3689        }
  3690      ],
  3691      "expectEvents": [
  3692        {
  3693          "client": "client",
  3694          "events": [
  3695            {
  3696              "commandStartedEvent": {
  3697                "commandName": "delete",
  3698                "databaseName": "test",
  3699                "command": {
  3700                  "delete": "coll",
  3701                  "maxTimeMS": {
  3702                    "$$type": [
  3703                      "int",
  3704                      "long"
  3705                    ]
  3706                  }
  3707                }
  3708              }
  3709            }
  3710          ]
  3711        }
  3712      ]
  3713    },
  3714    {
  3715      "description": "timeoutMS can be set to 0 on a MongoClient - deleteOne on collection",
  3716      "operations": [
  3717        {
  3718          "name": "createEntities",
  3719          "object": "testRunner",
  3720          "arguments": {
  3721            "entities": [
  3722              {
  3723                "client": {
  3724                  "id": "client",
  3725                  "uriOptions": {
  3726                    "timeoutMS": 0
  3727                  },
  3728                  "useMultipleMongoses": false,
  3729                  "observeEvents": [
  3730                    "commandStartedEvent"
  3731                  ],
  3732                  "ignoreCommandMonitoringEvents": [
  3733                    "killCursors"
  3734                  ]
  3735                }
  3736              },
  3737              {
  3738                "database": {
  3739                  "id": "database",
  3740                  "client": "client",
  3741                  "databaseName": "test"
  3742                }
  3743              },
  3744              {
  3745                "collection": {
  3746                  "id": "collection",
  3747                  "database": "database",
  3748                  "collectionName": "coll"
  3749                }
  3750              }
  3751            ]
  3752          }
  3753        },
  3754        {
  3755          "name": "failPoint",
  3756          "object": "testRunner",
  3757          "arguments": {
  3758            "client": "failPointClient",
  3759            "failPoint": {
  3760              "configureFailPoint": "failCommand",
  3761              "mode": {
  3762                "times": 1
  3763              },
  3764              "data": {
  3765                "failCommands": [
  3766                  "delete"
  3767                ],
  3768                "blockConnection": true,
  3769                "blockTimeMS": 15
  3770              }
  3771            }
  3772          }
  3773        },
  3774        {
  3775          "name": "deleteOne",
  3776          "object": "collection",
  3777          "arguments": {
  3778            "filter": {}
  3779          }
  3780        }
  3781      ],
  3782      "expectEvents": [
  3783        {
  3784          "client": "client",
  3785          "events": [
  3786            {
  3787              "commandStartedEvent": {
  3788                "commandName": "delete",
  3789                "databaseName": "test",
  3790                "command": {
  3791                  "delete": "coll",
  3792                  "maxTimeMS": {
  3793                    "$$exists": false
  3794                  }
  3795                }
  3796              }
  3797            }
  3798          ]
  3799        }
  3800      ]
  3801    },
  3802    {
  3803      "description": "timeoutMS can be configured on a MongoClient - deleteMany on collection",
  3804      "operations": [
  3805        {
  3806          "name": "createEntities",
  3807          "object": "testRunner",
  3808          "arguments": {
  3809            "entities": [
  3810              {
  3811                "client": {
  3812                  "id": "client",
  3813                  "uriOptions": {
  3814                    "timeoutMS": 50
  3815                  },
  3816                  "useMultipleMongoses": false,
  3817                  "observeEvents": [
  3818                    "commandStartedEvent"
  3819                  ]
  3820                }
  3821              },
  3822              {
  3823                "database": {
  3824                  "id": "database",
  3825                  "client": "client",
  3826                  "databaseName": "test"
  3827                }
  3828              },
  3829              {
  3830                "collection": {
  3831                  "id": "collection",
  3832                  "database": "database",
  3833                  "collectionName": "coll"
  3834                }
  3835              }
  3836            ]
  3837          }
  3838        },
  3839        {
  3840          "name": "failPoint",
  3841          "object": "testRunner",
  3842          "arguments": {
  3843            "client": "failPointClient",
  3844            "failPoint": {
  3845              "configureFailPoint": "failCommand",
  3846              "mode": {
  3847                "times": 1
  3848              },
  3849              "data": {
  3850                "failCommands": [
  3851                  "delete"
  3852                ],
  3853                "blockConnection": true,
  3854                "blockTimeMS": 60
  3855              }
  3856            }
  3857          }
  3858        },
  3859        {
  3860          "name": "deleteMany",
  3861          "object": "collection",
  3862          "arguments": {
  3863            "filter": {}
  3864          },
  3865          "expectError": {
  3866            "isTimeoutError": true
  3867          }
  3868        }
  3869      ],
  3870      "expectEvents": [
  3871        {
  3872          "client": "client",
  3873          "events": [
  3874            {
  3875              "commandStartedEvent": {
  3876                "commandName": "delete",
  3877                "databaseName": "test",
  3878                "command": {
  3879                  "delete": "coll",
  3880                  "maxTimeMS": {
  3881                    "$$type": [
  3882                      "int",
  3883                      "long"
  3884                    ]
  3885                  }
  3886                }
  3887              }
  3888            }
  3889          ]
  3890        }
  3891      ]
  3892    },
  3893    {
  3894      "description": "timeoutMS can be set to 0 on a MongoClient - deleteMany on collection",
  3895      "operations": [
  3896        {
  3897          "name": "createEntities",
  3898          "object": "testRunner",
  3899          "arguments": {
  3900            "entities": [
  3901              {
  3902                "client": {
  3903                  "id": "client",
  3904                  "uriOptions": {
  3905                    "timeoutMS": 0
  3906                  },
  3907                  "useMultipleMongoses": false,
  3908                  "observeEvents": [
  3909                    "commandStartedEvent"
  3910                  ],
  3911                  "ignoreCommandMonitoringEvents": [
  3912                    "killCursors"
  3913                  ]
  3914                }
  3915              },
  3916              {
  3917                "database": {
  3918                  "id": "database",
  3919                  "client": "client",
  3920                  "databaseName": "test"
  3921                }
  3922              },
  3923              {
  3924                "collection": {
  3925                  "id": "collection",
  3926                  "database": "database",
  3927                  "collectionName": "coll"
  3928                }
  3929              }
  3930            ]
  3931          }
  3932        },
  3933        {
  3934          "name": "failPoint",
  3935          "object": "testRunner",
  3936          "arguments": {
  3937            "client": "failPointClient",
  3938            "failPoint": {
  3939              "configureFailPoint": "failCommand",
  3940              "mode": {
  3941                "times": 1
  3942              },
  3943              "data": {
  3944                "failCommands": [
  3945                  "delete"
  3946                ],
  3947                "blockConnection": true,
  3948                "blockTimeMS": 15
  3949              }
  3950            }
  3951          }
  3952        },
  3953        {
  3954          "name": "deleteMany",
  3955          "object": "collection",
  3956          "arguments": {
  3957            "filter": {}
  3958          }
  3959        }
  3960      ],
  3961      "expectEvents": [
  3962        {
  3963          "client": "client",
  3964          "events": [
  3965            {
  3966              "commandStartedEvent": {
  3967                "commandName": "delete",
  3968                "databaseName": "test",
  3969                "command": {
  3970                  "delete": "coll",
  3971                  "maxTimeMS": {
  3972                    "$$exists": false
  3973                  }
  3974                }
  3975              }
  3976            }
  3977          ]
  3978        }
  3979      ]
  3980    },
  3981    {
  3982      "description": "timeoutMS can be configured on a MongoClient - replaceOne on collection",
  3983      "operations": [
  3984        {
  3985          "name": "createEntities",
  3986          "object": "testRunner",
  3987          "arguments": {
  3988            "entities": [
  3989              {
  3990                "client": {
  3991                  "id": "client",
  3992                  "uriOptions": {
  3993                    "timeoutMS": 50
  3994                  },
  3995                  "useMultipleMongoses": false,
  3996                  "observeEvents": [
  3997                    "commandStartedEvent"
  3998                  ]
  3999                }
  4000              },
  4001              {
  4002                "database": {
  4003                  "id": "database",
  4004                  "client": "client",
  4005                  "databaseName": "test"
  4006                }
  4007              },
  4008              {
  4009                "collection": {
  4010                  "id": "collection",
  4011                  "database": "database",
  4012                  "collectionName": "coll"
  4013                }
  4014              }
  4015            ]
  4016          }
  4017        },
  4018        {
  4019          "name": "failPoint",
  4020          "object": "testRunner",
  4021          "arguments": {
  4022            "client": "failPointClient",
  4023            "failPoint": {
  4024              "configureFailPoint": "failCommand",
  4025              "mode": {
  4026                "times": 1
  4027              },
  4028              "data": {
  4029                "failCommands": [
  4030                  "update"
  4031                ],
  4032                "blockConnection": true,
  4033                "blockTimeMS": 60
  4034              }
  4035            }
  4036          }
  4037        },
  4038        {
  4039          "name": "replaceOne",
  4040          "object": "collection",
  4041          "arguments": {
  4042            "filter": {},
  4043            "replacement": {
  4044              "x": 1
  4045            }
  4046          },
  4047          "expectError": {
  4048            "isTimeoutError": true
  4049          }
  4050        }
  4051      ],
  4052      "expectEvents": [
  4053        {
  4054          "client": "client",
  4055          "events": [
  4056            {
  4057              "commandStartedEvent": {
  4058                "commandName": "update",
  4059                "databaseName": "test",
  4060                "command": {
  4061                  "update": "coll",
  4062                  "maxTimeMS": {
  4063                    "$$type": [
  4064                      "int",
  4065                      "long"
  4066                    ]
  4067                  }
  4068                }
  4069              }
  4070            }
  4071          ]
  4072        }
  4073      ]
  4074    },
  4075    {
  4076      "description": "timeoutMS can be set to 0 on a MongoClient - replaceOne on collection",
  4077      "operations": [
  4078        {
  4079          "name": "createEntities",
  4080          "object": "testRunner",
  4081          "arguments": {
  4082            "entities": [
  4083              {
  4084                "client": {
  4085                  "id": "client",
  4086                  "uriOptions": {
  4087                    "timeoutMS": 0
  4088                  },
  4089                  "useMultipleMongoses": false,
  4090                  "observeEvents": [
  4091                    "commandStartedEvent"
  4092                  ],
  4093                  "ignoreCommandMonitoringEvents": [
  4094                    "killCursors"
  4095                  ]
  4096                }
  4097              },
  4098              {
  4099                "database": {
  4100                  "id": "database",
  4101                  "client": "client",
  4102                  "databaseName": "test"
  4103                }
  4104              },
  4105              {
  4106                "collection": {
  4107                  "id": "collection",
  4108                  "database": "database",
  4109                  "collectionName": "coll"
  4110                }
  4111              }
  4112            ]
  4113          }
  4114        },
  4115        {
  4116          "name": "failPoint",
  4117          "object": "testRunner",
  4118          "arguments": {
  4119            "client": "failPointClient",
  4120            "failPoint": {
  4121              "configureFailPoint": "failCommand",
  4122              "mode": {
  4123                "times": 1
  4124              },
  4125              "data": {
  4126                "failCommands": [
  4127                  "update"
  4128                ],
  4129                "blockConnection": true,
  4130                "blockTimeMS": 15
  4131              }
  4132            }
  4133          }
  4134        },
  4135        {
  4136          "name": "replaceOne",
  4137          "object": "collection",
  4138          "arguments": {
  4139            "filter": {},
  4140            "replacement": {
  4141              "x": 1
  4142            }
  4143          }
  4144        }
  4145      ],
  4146      "expectEvents": [
  4147        {
  4148          "client": "client",
  4149          "events": [
  4150            {
  4151              "commandStartedEvent": {
  4152                "commandName": "update",
  4153                "databaseName": "test",
  4154                "command": {
  4155                  "update": "coll",
  4156                  "maxTimeMS": {
  4157                    "$$exists": false
  4158                  }
  4159                }
  4160              }
  4161            }
  4162          ]
  4163        }
  4164      ]
  4165    },
  4166    {
  4167      "description": "timeoutMS can be configured on a MongoClient - updateOne on collection",
  4168      "operations": [
  4169        {
  4170          "name": "createEntities",
  4171          "object": "testRunner",
  4172          "arguments": {
  4173            "entities": [
  4174              {
  4175                "client": {
  4176                  "id": "client",
  4177                  "uriOptions": {
  4178                    "timeoutMS": 50
  4179                  },
  4180                  "useMultipleMongoses": false,
  4181                  "observeEvents": [
  4182                    "commandStartedEvent"
  4183                  ]
  4184                }
  4185              },
  4186              {
  4187                "database": {
  4188                  "id": "database",
  4189                  "client": "client",
  4190                  "databaseName": "test"
  4191                }
  4192              },
  4193              {
  4194                "collection": {
  4195                  "id": "collection",
  4196                  "database": "database",
  4197                  "collectionName": "coll"
  4198                }
  4199              }
  4200            ]
  4201          }
  4202        },
  4203        {
  4204          "name": "failPoint",
  4205          "object": "testRunner",
  4206          "arguments": {
  4207            "client": "failPointClient",
  4208            "failPoint": {
  4209              "configureFailPoint": "failCommand",
  4210              "mode": {
  4211                "times": 1
  4212              },
  4213              "data": {
  4214                "failCommands": [
  4215                  "update"
  4216                ],
  4217                "blockConnection": true,
  4218                "blockTimeMS": 60
  4219              }
  4220            }
  4221          }
  4222        },
  4223        {
  4224          "name": "updateOne",
  4225          "object": "collection",
  4226          "arguments": {
  4227            "filter": {},
  4228            "update": {
  4229              "$set": {
  4230                "x": 1
  4231              }
  4232            }
  4233          },
  4234          "expectError": {
  4235            "isTimeoutError": true
  4236          }
  4237        }
  4238      ],
  4239      "expectEvents": [
  4240        {
  4241          "client": "client",
  4242          "events": [
  4243            {
  4244              "commandStartedEvent": {
  4245                "commandName": "update",
  4246                "databaseName": "test",
  4247                "command": {
  4248                  "update": "coll",
  4249                  "maxTimeMS": {
  4250                    "$$type": [
  4251                      "int",
  4252                      "long"
  4253                    ]
  4254                  }
  4255                }
  4256              }
  4257            }
  4258          ]
  4259        }
  4260      ]
  4261    },
  4262    {
  4263      "description": "timeoutMS can be set to 0 on a MongoClient - updateOne on collection",
  4264      "operations": [
  4265        {
  4266          "name": "createEntities",
  4267          "object": "testRunner",
  4268          "arguments": {
  4269            "entities": [
  4270              {
  4271                "client": {
  4272                  "id": "client",
  4273                  "uriOptions": {
  4274                    "timeoutMS": 0
  4275                  },
  4276                  "useMultipleMongoses": false,
  4277                  "observeEvents": [
  4278                    "commandStartedEvent"
  4279                  ],
  4280                  "ignoreCommandMonitoringEvents": [
  4281                    "killCursors"
  4282                  ]
  4283                }
  4284              },
  4285              {
  4286                "database": {
  4287                  "id": "database",
  4288                  "client": "client",
  4289                  "databaseName": "test"
  4290                }
  4291              },
  4292              {
  4293                "collection": {
  4294                  "id": "collection",
  4295                  "database": "database",
  4296                  "collectionName": "coll"
  4297                }
  4298              }
  4299            ]
  4300          }
  4301        },
  4302        {
  4303          "name": "failPoint",
  4304          "object": "testRunner",
  4305          "arguments": {
  4306            "client": "failPointClient",
  4307            "failPoint": {
  4308              "configureFailPoint": "failCommand",
  4309              "mode": {
  4310                "times": 1
  4311              },
  4312              "data": {
  4313                "failCommands": [
  4314                  "update"
  4315                ],
  4316                "blockConnection": true,
  4317                "blockTimeMS": 15
  4318              }
  4319            }
  4320          }
  4321        },
  4322        {
  4323          "name": "updateOne",
  4324          "object": "collection",
  4325          "arguments": {
  4326            "filter": {},
  4327            "update": {
  4328              "$set": {
  4329                "x": 1
  4330              }
  4331            }
  4332          }
  4333        }
  4334      ],
  4335      "expectEvents": [
  4336        {
  4337          "client": "client",
  4338          "events": [
  4339            {
  4340              "commandStartedEvent": {
  4341                "commandName": "update",
  4342                "databaseName": "test",
  4343                "command": {
  4344                  "update": "coll",
  4345                  "maxTimeMS": {
  4346                    "$$exists": false
  4347                  }
  4348                }
  4349              }
  4350            }
  4351          ]
  4352        }
  4353      ]
  4354    },
  4355    {
  4356      "description": "timeoutMS can be configured on a MongoClient - updateMany on collection",
  4357      "operations": [
  4358        {
  4359          "name": "createEntities",
  4360          "object": "testRunner",
  4361          "arguments": {
  4362            "entities": [
  4363              {
  4364                "client": {
  4365                  "id": "client",
  4366                  "uriOptions": {
  4367                    "timeoutMS": 50
  4368                  },
  4369                  "useMultipleMongoses": false,
  4370                  "observeEvents": [
  4371                    "commandStartedEvent"
  4372                  ]
  4373                }
  4374              },
  4375              {
  4376                "database": {
  4377                  "id": "database",
  4378                  "client": "client",
  4379                  "databaseName": "test"
  4380                }
  4381              },
  4382              {
  4383                "collection": {
  4384                  "id": "collection",
  4385                  "database": "database",
  4386                  "collectionName": "coll"
  4387                }
  4388              }
  4389            ]
  4390          }
  4391        },
  4392        {
  4393          "name": "failPoint",
  4394          "object": "testRunner",
  4395          "arguments": {
  4396            "client": "failPointClient",
  4397            "failPoint": {
  4398              "configureFailPoint": "failCommand",
  4399              "mode": {
  4400                "times": 1
  4401              },
  4402              "data": {
  4403                "failCommands": [
  4404                  "update"
  4405                ],
  4406                "blockConnection": true,
  4407                "blockTimeMS": 60
  4408              }
  4409            }
  4410          }
  4411        },
  4412        {
  4413          "name": "updateMany",
  4414          "object": "collection",
  4415          "arguments": {
  4416            "filter": {},
  4417            "update": {
  4418              "$set": {
  4419                "x": 1
  4420              }
  4421            }
  4422          },
  4423          "expectError": {
  4424            "isTimeoutError": true
  4425          }
  4426        }
  4427      ],
  4428      "expectEvents": [
  4429        {
  4430          "client": "client",
  4431          "events": [
  4432            {
  4433              "commandStartedEvent": {
  4434                "commandName": "update",
  4435                "databaseName": "test",
  4436                "command": {
  4437                  "update": "coll",
  4438                  "maxTimeMS": {
  4439                    "$$type": [
  4440                      "int",
  4441                      "long"
  4442                    ]
  4443                  }
  4444                }
  4445              }
  4446            }
  4447          ]
  4448        }
  4449      ]
  4450    },
  4451    {
  4452      "description": "timeoutMS can be set to 0 on a MongoClient - updateMany on collection",
  4453      "operations": [
  4454        {
  4455          "name": "createEntities",
  4456          "object": "testRunner",
  4457          "arguments": {
  4458            "entities": [
  4459              {
  4460                "client": {
  4461                  "id": "client",
  4462                  "uriOptions": {
  4463                    "timeoutMS": 0
  4464                  },
  4465                  "useMultipleMongoses": false,
  4466                  "observeEvents": [
  4467                    "commandStartedEvent"
  4468                  ],
  4469                  "ignoreCommandMonitoringEvents": [
  4470                    "killCursors"
  4471                  ]
  4472                }
  4473              },
  4474              {
  4475                "database": {
  4476                  "id": "database",
  4477                  "client": "client",
  4478                  "databaseName": "test"
  4479                }
  4480              },
  4481              {
  4482                "collection": {
  4483                  "id": "collection",
  4484                  "database": "database",
  4485                  "collectionName": "coll"
  4486                }
  4487              }
  4488            ]
  4489          }
  4490        },
  4491        {
  4492          "name": "failPoint",
  4493          "object": "testRunner",
  4494          "arguments": {
  4495            "client": "failPointClient",
  4496            "failPoint": {
  4497              "configureFailPoint": "failCommand",
  4498              "mode": {
  4499                "times": 1
  4500              },
  4501              "data": {
  4502                "failCommands": [
  4503                  "update"
  4504                ],
  4505                "blockConnection": true,
  4506                "blockTimeMS": 15
  4507              }
  4508            }
  4509          }
  4510        },
  4511        {
  4512          "name": "updateMany",
  4513          "object": "collection",
  4514          "arguments": {
  4515            "filter": {},
  4516            "update": {
  4517              "$set": {
  4518                "x": 1
  4519              }
  4520            }
  4521          }
  4522        }
  4523      ],
  4524      "expectEvents": [
  4525        {
  4526          "client": "client",
  4527          "events": [
  4528            {
  4529              "commandStartedEvent": {
  4530                "commandName": "update",
  4531                "databaseName": "test",
  4532                "command": {
  4533                  "update": "coll",
  4534                  "maxTimeMS": {
  4535                    "$$exists": false
  4536                  }
  4537                }
  4538              }
  4539            }
  4540          ]
  4541        }
  4542      ]
  4543    },
  4544    {
  4545      "description": "timeoutMS can be configured on a MongoClient - findOneAndDelete on collection",
  4546      "operations": [
  4547        {
  4548          "name": "createEntities",
  4549          "object": "testRunner",
  4550          "arguments": {
  4551            "entities": [
  4552              {
  4553                "client": {
  4554                  "id": "client",
  4555                  "uriOptions": {
  4556                    "timeoutMS": 50
  4557                  },
  4558                  "useMultipleMongoses": false,
  4559                  "observeEvents": [
  4560                    "commandStartedEvent"
  4561                  ]
  4562                }
  4563              },
  4564              {
  4565                "database": {
  4566                  "id": "database",
  4567                  "client": "client",
  4568                  "databaseName": "test"
  4569                }
  4570              },
  4571              {
  4572                "collection": {
  4573                  "id": "collection",
  4574                  "database": "database",
  4575                  "collectionName": "coll"
  4576                }
  4577              }
  4578            ]
  4579          }
  4580        },
  4581        {
  4582          "name": "failPoint",
  4583          "object": "testRunner",
  4584          "arguments": {
  4585            "client": "failPointClient",
  4586            "failPoint": {
  4587              "configureFailPoint": "failCommand",
  4588              "mode": {
  4589                "times": 1
  4590              },
  4591              "data": {
  4592                "failCommands": [
  4593                  "findAndModify"
  4594                ],
  4595                "blockConnection": true,
  4596                "blockTimeMS": 60
  4597              }
  4598            }
  4599          }
  4600        },
  4601        {
  4602          "name": "findOneAndDelete",
  4603          "object": "collection",
  4604          "arguments": {
  4605            "filter": {}
  4606          },
  4607          "expectError": {
  4608            "isTimeoutError": true
  4609          }
  4610        }
  4611      ],
  4612      "expectEvents": [
  4613        {
  4614          "client": "client",
  4615          "events": [
  4616            {
  4617              "commandStartedEvent": {
  4618                "commandName": "findAndModify",
  4619                "databaseName": "test",
  4620                "command": {
  4621                  "findAndModify": "coll",
  4622                  "maxTimeMS": {
  4623                    "$$type": [
  4624                      "int",
  4625                      "long"
  4626                    ]
  4627                  }
  4628                }
  4629              }
  4630            }
  4631          ]
  4632        }
  4633      ]
  4634    },
  4635    {
  4636      "description": "timeoutMS can be set to 0 on a MongoClient - findOneAndDelete on collection",
  4637      "operations": [
  4638        {
  4639          "name": "createEntities",
  4640          "object": "testRunner",
  4641          "arguments": {
  4642            "entities": [
  4643              {
  4644                "client": {
  4645                  "id": "client",
  4646                  "uriOptions": {
  4647                    "timeoutMS": 0
  4648                  },
  4649                  "useMultipleMongoses": false,
  4650                  "observeEvents": [
  4651                    "commandStartedEvent"
  4652                  ],
  4653                  "ignoreCommandMonitoringEvents": [
  4654                    "killCursors"
  4655                  ]
  4656                }
  4657              },
  4658              {
  4659                "database": {
  4660                  "id": "database",
  4661                  "client": "client",
  4662                  "databaseName": "test"
  4663                }
  4664              },
  4665              {
  4666                "collection": {
  4667                  "id": "collection",
  4668                  "database": "database",
  4669                  "collectionName": "coll"
  4670                }
  4671              }
  4672            ]
  4673          }
  4674        },
  4675        {
  4676          "name": "failPoint",
  4677          "object": "testRunner",
  4678          "arguments": {
  4679            "client": "failPointClient",
  4680            "failPoint": {
  4681              "configureFailPoint": "failCommand",
  4682              "mode": {
  4683                "times": 1
  4684              },
  4685              "data": {
  4686                "failCommands": [
  4687                  "findAndModify"
  4688                ],
  4689                "blockConnection": true,
  4690                "blockTimeMS": 15
  4691              }
  4692            }
  4693          }
  4694        },
  4695        {
  4696          "name": "findOneAndDelete",
  4697          "object": "collection",
  4698          "arguments": {
  4699            "filter": {}
  4700          }
  4701        }
  4702      ],
  4703      "expectEvents": [
  4704        {
  4705          "client": "client",
  4706          "events": [
  4707            {
  4708              "commandStartedEvent": {
  4709                "commandName": "findAndModify",
  4710                "databaseName": "test",
  4711                "command": {
  4712                  "findAndModify": "coll",
  4713                  "maxTimeMS": {
  4714                    "$$exists": false
  4715                  }
  4716                }
  4717              }
  4718            }
  4719          ]
  4720        }
  4721      ]
  4722    },
  4723    {
  4724      "description": "timeoutMS can be configured on a MongoClient - findOneAndReplace on collection",
  4725      "operations": [
  4726        {
  4727          "name": "createEntities",
  4728          "object": "testRunner",
  4729          "arguments": {
  4730            "entities": [
  4731              {
  4732                "client": {
  4733                  "id": "client",
  4734                  "uriOptions": {
  4735                    "timeoutMS": 50
  4736                  },
  4737                  "useMultipleMongoses": false,
  4738                  "observeEvents": [
  4739                    "commandStartedEvent"
  4740                  ]
  4741                }
  4742              },
  4743              {
  4744                "database": {
  4745                  "id": "database",
  4746                  "client": "client",
  4747                  "databaseName": "test"
  4748                }
  4749              },
  4750              {
  4751                "collection": {
  4752                  "id": "collection",
  4753                  "database": "database",
  4754                  "collectionName": "coll"
  4755                }
  4756              }
  4757            ]
  4758          }
  4759        },
  4760        {
  4761          "name": "failPoint",
  4762          "object": "testRunner",
  4763          "arguments": {
  4764            "client": "failPointClient",
  4765            "failPoint": {
  4766              "configureFailPoint": "failCommand",
  4767              "mode": {
  4768                "times": 1
  4769              },
  4770              "data": {
  4771                "failCommands": [
  4772                  "findAndModify"
  4773                ],
  4774                "blockConnection": true,
  4775                "blockTimeMS": 60
  4776              }
  4777            }
  4778          }
  4779        },
  4780        {
  4781          "name": "findOneAndReplace",
  4782          "object": "collection",
  4783          "arguments": {
  4784            "filter": {},
  4785            "replacement": {
  4786              "x": 1
  4787            }
  4788          },
  4789          "expectError": {
  4790            "isTimeoutError": true
  4791          }
  4792        }
  4793      ],
  4794      "expectEvents": [
  4795        {
  4796          "client": "client",
  4797          "events": [
  4798            {
  4799              "commandStartedEvent": {
  4800                "commandName": "findAndModify",
  4801                "databaseName": "test",
  4802                "command": {
  4803                  "findAndModify": "coll",
  4804                  "maxTimeMS": {
  4805                    "$$type": [
  4806                      "int",
  4807                      "long"
  4808                    ]
  4809                  }
  4810                }
  4811              }
  4812            }
  4813          ]
  4814        }
  4815      ]
  4816    },
  4817    {
  4818      "description": "timeoutMS can be set to 0 on a MongoClient - findOneAndReplace on collection",
  4819      "operations": [
  4820        {
  4821          "name": "createEntities",
  4822          "object": "testRunner",
  4823          "arguments": {
  4824            "entities": [
  4825              {
  4826                "client": {
  4827                  "id": "client",
  4828                  "uriOptions": {
  4829                    "timeoutMS": 0
  4830                  },
  4831                  "useMultipleMongoses": false,
  4832                  "observeEvents": [
  4833                    "commandStartedEvent"
  4834                  ],
  4835                  "ignoreCommandMonitoringEvents": [
  4836                    "killCursors"
  4837                  ]
  4838                }
  4839              },
  4840              {
  4841                "database": {
  4842                  "id": "database",
  4843                  "client": "client",
  4844                  "databaseName": "test"
  4845                }
  4846              },
  4847              {
  4848                "collection": {
  4849                  "id": "collection",
  4850                  "database": "database",
  4851                  "collectionName": "coll"
  4852                }
  4853              }
  4854            ]
  4855          }
  4856        },
  4857        {
  4858          "name": "failPoint",
  4859          "object": "testRunner",
  4860          "arguments": {
  4861            "client": "failPointClient",
  4862            "failPoint": {
  4863              "configureFailPoint": "failCommand",
  4864              "mode": {
  4865                "times": 1
  4866              },
  4867              "data": {
  4868                "failCommands": [
  4869                  "findAndModify"
  4870                ],
  4871                "blockConnection": true,
  4872                "blockTimeMS": 15
  4873              }
  4874            }
  4875          }
  4876        },
  4877        {
  4878          "name": "findOneAndReplace",
  4879          "object": "collection",
  4880          "arguments": {
  4881            "filter": {},
  4882            "replacement": {
  4883              "x": 1
  4884            }
  4885          }
  4886        }
  4887      ],
  4888      "expectEvents": [
  4889        {
  4890          "client": "client",
  4891          "events": [
  4892            {
  4893              "commandStartedEvent": {
  4894                "commandName": "findAndModify",
  4895                "databaseName": "test",
  4896                "command": {
  4897                  "findAndModify": "coll",
  4898                  "maxTimeMS": {
  4899                    "$$exists": false
  4900                  }
  4901                }
  4902              }
  4903            }
  4904          ]
  4905        }
  4906      ]
  4907    },
  4908    {
  4909      "description": "timeoutMS can be configured on a MongoClient - findOneAndUpdate on collection",
  4910      "operations": [
  4911        {
  4912          "name": "createEntities",
  4913          "object": "testRunner",
  4914          "arguments": {
  4915            "entities": [
  4916              {
  4917                "client": {
  4918                  "id": "client",
  4919                  "uriOptions": {
  4920                    "timeoutMS": 50
  4921                  },
  4922                  "useMultipleMongoses": false,
  4923                  "observeEvents": [
  4924                    "commandStartedEvent"
  4925                  ]
  4926                }
  4927              },
  4928              {
  4929                "database": {
  4930                  "id": "database",
  4931                  "client": "client",
  4932                  "databaseName": "test"
  4933                }
  4934              },
  4935              {
  4936                "collection": {
  4937                  "id": "collection",
  4938                  "database": "database",
  4939                  "collectionName": "coll"
  4940                }
  4941              }
  4942            ]
  4943          }
  4944        },
  4945        {
  4946          "name": "failPoint",
  4947          "object": "testRunner",
  4948          "arguments": {
  4949            "client": "failPointClient",
  4950            "failPoint": {
  4951              "configureFailPoint": "failCommand",
  4952              "mode": {
  4953                "times": 1
  4954              },
  4955              "data": {
  4956                "failCommands": [
  4957                  "findAndModify"
  4958                ],
  4959                "blockConnection": true,
  4960                "blockTimeMS": 60
  4961              }
  4962            }
  4963          }
  4964        },
  4965        {
  4966          "name": "findOneAndUpdate",
  4967          "object": "collection",
  4968          "arguments": {
  4969            "filter": {},
  4970            "update": {
  4971              "$set": {
  4972                "x": 1
  4973              }
  4974            }
  4975          },
  4976          "expectError": {
  4977            "isTimeoutError": true
  4978          }
  4979        }
  4980      ],
  4981      "expectEvents": [
  4982        {
  4983          "client": "client",
  4984          "events": [
  4985            {
  4986              "commandStartedEvent": {
  4987                "commandName": "findAndModify",
  4988                "databaseName": "test",
  4989                "command": {
  4990                  "findAndModify": "coll",
  4991                  "maxTimeMS": {
  4992                    "$$type": [
  4993                      "int",
  4994                      "long"
  4995                    ]
  4996                  }
  4997                }
  4998              }
  4999            }
  5000          ]
  5001        }
  5002      ]
  5003    },
  5004    {
  5005      "description": "timeoutMS can be set to 0 on a MongoClient - findOneAndUpdate on collection",
  5006      "operations": [
  5007        {
  5008          "name": "createEntities",
  5009          "object": "testRunner",
  5010          "arguments": {
  5011            "entities": [
  5012              {
  5013                "client": {
  5014                  "id": "client",
  5015                  "uriOptions": {
  5016                    "timeoutMS": 0
  5017                  },
  5018                  "useMultipleMongoses": false,
  5019                  "observeEvents": [
  5020                    "commandStartedEvent"
  5021                  ],
  5022                  "ignoreCommandMonitoringEvents": [
  5023                    "killCursors"
  5024                  ]
  5025                }
  5026              },
  5027              {
  5028                "database": {
  5029                  "id": "database",
  5030                  "client": "client",
  5031                  "databaseName": "test"
  5032                }
  5033              },
  5034              {
  5035                "collection": {
  5036                  "id": "collection",
  5037                  "database": "database",
  5038                  "collectionName": "coll"
  5039                }
  5040              }
  5041            ]
  5042          }
  5043        },
  5044        {
  5045          "name": "failPoint",
  5046          "object": "testRunner",
  5047          "arguments": {
  5048            "client": "failPointClient",
  5049            "failPoint": {
  5050              "configureFailPoint": "failCommand",
  5051              "mode": {
  5052                "times": 1
  5053              },
  5054              "data": {
  5055                "failCommands": [
  5056                  "findAndModify"
  5057                ],
  5058                "blockConnection": true,
  5059                "blockTimeMS": 15
  5060              }
  5061            }
  5062          }
  5063        },
  5064        {
  5065          "name": "findOneAndUpdate",
  5066          "object": "collection",
  5067          "arguments": {
  5068            "filter": {},
  5069            "update": {
  5070              "$set": {
  5071                "x": 1
  5072              }
  5073            }
  5074          }
  5075        }
  5076      ],
  5077      "expectEvents": [
  5078        {
  5079          "client": "client",
  5080          "events": [
  5081            {
  5082              "commandStartedEvent": {
  5083                "commandName": "findAndModify",
  5084                "databaseName": "test",
  5085                "command": {
  5086                  "findAndModify": "coll",
  5087                  "maxTimeMS": {
  5088                    "$$exists": false
  5089                  }
  5090                }
  5091              }
  5092            }
  5093          ]
  5094        }
  5095      ]
  5096    },
  5097    {
  5098      "description": "timeoutMS can be configured on a MongoClient - bulkWrite on collection",
  5099      "operations": [
  5100        {
  5101          "name": "createEntities",
  5102          "object": "testRunner",
  5103          "arguments": {
  5104            "entities": [
  5105              {
  5106                "client": {
  5107                  "id": "client",
  5108                  "uriOptions": {
  5109                    "timeoutMS": 50
  5110                  },
  5111                  "useMultipleMongoses": false,
  5112                  "observeEvents": [
  5113                    "commandStartedEvent"
  5114                  ]
  5115                }
  5116              },
  5117              {
  5118                "database": {
  5119                  "id": "database",
  5120                  "client": "client",
  5121                  "databaseName": "test"
  5122                }
  5123              },
  5124              {
  5125                "collection": {
  5126                  "id": "collection",
  5127                  "database": "database",
  5128                  "collectionName": "coll"
  5129                }
  5130              }
  5131            ]
  5132          }
  5133        },
  5134        {
  5135          "name": "failPoint",
  5136          "object": "testRunner",
  5137          "arguments": {
  5138            "client": "failPointClient",
  5139            "failPoint": {
  5140              "configureFailPoint": "failCommand",
  5141              "mode": {
  5142                "times": 1
  5143              },
  5144              "data": {
  5145                "failCommands": [
  5146                  "insert"
  5147                ],
  5148                "blockConnection": true,
  5149                "blockTimeMS": 60
  5150              }
  5151            }
  5152          }
  5153        },
  5154        {
  5155          "name": "bulkWrite",
  5156          "object": "collection",
  5157          "arguments": {
  5158            "requests": [
  5159              {
  5160                "insertOne": {
  5161                  "document": {
  5162                    "_id": 1
  5163                  }
  5164                }
  5165              }
  5166            ]
  5167          },
  5168          "expectError": {
  5169            "isTimeoutError": true
  5170          }
  5171        }
  5172      ],
  5173      "expectEvents": [
  5174        {
  5175          "client": "client",
  5176          "events": [
  5177            {
  5178              "commandStartedEvent": {
  5179                "commandName": "insert",
  5180                "databaseName": "test",
  5181                "command": {
  5182                  "insert": "coll",
  5183                  "maxTimeMS": {
  5184                    "$$type": [
  5185                      "int",
  5186                      "long"
  5187                    ]
  5188                  }
  5189                }
  5190              }
  5191            }
  5192          ]
  5193        }
  5194      ]
  5195    },
  5196    {
  5197      "description": "timeoutMS can be set to 0 on a MongoClient - bulkWrite on collection",
  5198      "operations": [
  5199        {
  5200          "name": "createEntities",
  5201          "object": "testRunner",
  5202          "arguments": {
  5203            "entities": [
  5204              {
  5205                "client": {
  5206                  "id": "client",
  5207                  "uriOptions": {
  5208                    "timeoutMS": 0
  5209                  },
  5210                  "useMultipleMongoses": false,
  5211                  "observeEvents": [
  5212                    "commandStartedEvent"
  5213                  ],
  5214                  "ignoreCommandMonitoringEvents": [
  5215                    "killCursors"
  5216                  ]
  5217                }
  5218              },
  5219              {
  5220                "database": {
  5221                  "id": "database",
  5222                  "client": "client",
  5223                  "databaseName": "test"
  5224                }
  5225              },
  5226              {
  5227                "collection": {
  5228                  "id": "collection",
  5229                  "database": "database",
  5230                  "collectionName": "coll"
  5231                }
  5232              }
  5233            ]
  5234          }
  5235        },
  5236        {
  5237          "name": "failPoint",
  5238          "object": "testRunner",
  5239          "arguments": {
  5240            "client": "failPointClient",
  5241            "failPoint": {
  5242              "configureFailPoint": "failCommand",
  5243              "mode": {
  5244                "times": 1
  5245              },
  5246              "data": {
  5247                "failCommands": [
  5248                  "insert"
  5249                ],
  5250                "blockConnection": true,
  5251                "blockTimeMS": 15
  5252              }
  5253            }
  5254          }
  5255        },
  5256        {
  5257          "name": "bulkWrite",
  5258          "object": "collection",
  5259          "arguments": {
  5260            "requests": [
  5261              {
  5262                "insertOne": {
  5263                  "document": {
  5264                    "_id": 1
  5265                  }
  5266                }
  5267              }
  5268            ]
  5269          }
  5270        }
  5271      ],
  5272      "expectEvents": [
  5273        {
  5274          "client": "client",
  5275          "events": [
  5276            {
  5277              "commandStartedEvent": {
  5278                "commandName": "insert",
  5279                "databaseName": "test",
  5280                "command": {
  5281                  "insert": "coll",
  5282                  "maxTimeMS": {
  5283                    "$$exists": false
  5284                  }
  5285                }
  5286              }
  5287            }
  5288          ]
  5289        }
  5290      ]
  5291    },
  5292    {
  5293      "description": "timeoutMS can be configured on a MongoClient - createIndex on collection",
  5294      "operations": [
  5295        {
  5296          "name": "createEntities",
  5297          "object": "testRunner",
  5298          "arguments": {
  5299            "entities": [
  5300              {
  5301                "client": {
  5302                  "id": "client",
  5303                  "uriOptions": {
  5304                    "timeoutMS": 50
  5305                  },
  5306                  "useMultipleMongoses": false,
  5307                  "observeEvents": [
  5308                    "commandStartedEvent"
  5309                  ]
  5310                }
  5311              },
  5312              {
  5313                "database": {
  5314                  "id": "database",
  5315                  "client": "client",
  5316                  "databaseName": "test"
  5317                }
  5318              },
  5319              {
  5320                "collection": {
  5321                  "id": "collection",
  5322                  "database": "database",
  5323                  "collectionName": "coll"
  5324                }
  5325              }
  5326            ]
  5327          }
  5328        },
  5329        {
  5330          "name": "failPoint",
  5331          "object": "testRunner",
  5332          "arguments": {
  5333            "client": "failPointClient",
  5334            "failPoint": {
  5335              "configureFailPoint": "failCommand",
  5336              "mode": {
  5337                "times": 1
  5338              },
  5339              "data": {
  5340                "failCommands": [
  5341                  "createIndexes"
  5342                ],
  5343                "blockConnection": true,
  5344                "blockTimeMS": 60
  5345              }
  5346            }
  5347          }
  5348        },
  5349        {
  5350          "name": "createIndex",
  5351          "object": "collection",
  5352          "arguments": {
  5353            "keys": {
  5354              "x": 1
  5355            },
  5356            "name": "x_1"
  5357          },
  5358          "expectError": {
  5359            "isTimeoutError": true
  5360          }
  5361        }
  5362      ],
  5363      "expectEvents": [
  5364        {
  5365          "client": "client",
  5366          "events": [
  5367            {
  5368              "commandStartedEvent": {
  5369                "commandName": "createIndexes",
  5370                "databaseName": "test",
  5371                "command": {
  5372                  "createIndexes": "coll",
  5373                  "maxTimeMS": {
  5374                    "$$type": [
  5375                      "int",
  5376                      "long"
  5377                    ]
  5378                  }
  5379                }
  5380              }
  5381            }
  5382          ]
  5383        }
  5384      ]
  5385    },
  5386    {
  5387      "description": "timeoutMS can be set to 0 on a MongoClient - createIndex on collection",
  5388      "operations": [
  5389        {
  5390          "name": "createEntities",
  5391          "object": "testRunner",
  5392          "arguments": {
  5393            "entities": [
  5394              {
  5395                "client": {
  5396                  "id": "client",
  5397                  "uriOptions": {
  5398                    "timeoutMS": 0
  5399                  },
  5400                  "useMultipleMongoses": false,
  5401                  "observeEvents": [
  5402                    "commandStartedEvent"
  5403                  ],
  5404                  "ignoreCommandMonitoringEvents": [
  5405                    "killCursors"
  5406                  ]
  5407                }
  5408              },
  5409              {
  5410                "database": {
  5411                  "id": "database",
  5412                  "client": "client",
  5413                  "databaseName": "test"
  5414                }
  5415              },
  5416              {
  5417                "collection": {
  5418                  "id": "collection",
  5419                  "database": "database",
  5420                  "collectionName": "coll"
  5421                }
  5422              }
  5423            ]
  5424          }
  5425        },
  5426        {
  5427          "name": "failPoint",
  5428          "object": "testRunner",
  5429          "arguments": {
  5430            "client": "failPointClient",
  5431            "failPoint": {
  5432              "configureFailPoint": "failCommand",
  5433              "mode": {
  5434                "times": 1
  5435              },
  5436              "data": {
  5437                "failCommands": [
  5438                  "createIndexes"
  5439                ],
  5440                "blockConnection": true,
  5441                "blockTimeMS": 15
  5442              }
  5443            }
  5444          }
  5445        },
  5446        {
  5447          "name": "createIndex",
  5448          "object": "collection",
  5449          "arguments": {
  5450            "keys": {
  5451              "x": 1
  5452            },
  5453            "name": "x_1"
  5454          }
  5455        }
  5456      ],
  5457      "expectEvents": [
  5458        {
  5459          "client": "client",
  5460          "events": [
  5461            {
  5462              "commandStartedEvent": {
  5463                "commandName": "createIndexes",
  5464                "databaseName": "test",
  5465                "command": {
  5466                  "createIndexes": "coll",
  5467                  "maxTimeMS": {
  5468                    "$$exists": false
  5469                  }
  5470                }
  5471              }
  5472            }
  5473          ]
  5474        }
  5475      ]
  5476    },
  5477    {
  5478      "description": "timeoutMS can be configured on a MongoClient - dropIndex on collection",
  5479      "operations": [
  5480        {
  5481          "name": "createEntities",
  5482          "object": "testRunner",
  5483          "arguments": {
  5484            "entities": [
  5485              {
  5486                "client": {
  5487                  "id": "client",
  5488                  "uriOptions": {
  5489                    "timeoutMS": 50
  5490                  },
  5491                  "useMultipleMongoses": false,
  5492                  "observeEvents": [
  5493                    "commandStartedEvent"
  5494                  ]
  5495                }
  5496              },
  5497              {
  5498                "database": {
  5499                  "id": "database",
  5500                  "client": "client",
  5501                  "databaseName": "test"
  5502                }
  5503              },
  5504              {
  5505                "collection": {
  5506                  "id": "collection",
  5507                  "database": "database",
  5508                  "collectionName": "coll"
  5509                }
  5510              }
  5511            ]
  5512          }
  5513        },
  5514        {
  5515          "name": "failPoint",
  5516          "object": "testRunner",
  5517          "arguments": {
  5518            "client": "failPointClient",
  5519            "failPoint": {
  5520              "configureFailPoint": "failCommand",
  5521              "mode": {
  5522                "times": 1
  5523              },
  5524              "data": {
  5525                "failCommands": [
  5526                  "dropIndexes"
  5527                ],
  5528                "blockConnection": true,
  5529                "blockTimeMS": 60
  5530              }
  5531            }
  5532          }
  5533        },
  5534        {
  5535          "name": "dropIndex",
  5536          "object": "collection",
  5537          "arguments": {
  5538            "name": "x_1"
  5539          },
  5540          "expectError": {
  5541            "isTimeoutError": true
  5542          }
  5543        }
  5544      ],
  5545      "expectEvents": [
  5546        {
  5547          "client": "client",
  5548          "events": [
  5549            {
  5550              "commandStartedEvent": {
  5551                "commandName": "dropIndexes",
  5552                "databaseName": "test",
  5553                "command": {
  5554                  "dropIndexes": "coll",
  5555                  "maxTimeMS": {
  5556                    "$$type": [
  5557                      "int",
  5558                      "long"
  5559                    ]
  5560                  }
  5561                }
  5562              }
  5563            }
  5564          ]
  5565        }
  5566      ]
  5567    },
  5568    {
  5569      "description": "timeoutMS can be set to 0 on a MongoClient - dropIndex on collection",
  5570      "operations": [
  5571        {
  5572          "name": "createEntities",
  5573          "object": "testRunner",
  5574          "arguments": {
  5575            "entities": [
  5576              {
  5577                "client": {
  5578                  "id": "client",
  5579                  "uriOptions": {
  5580                    "timeoutMS": 0
  5581                  },
  5582                  "useMultipleMongoses": false,
  5583                  "observeEvents": [
  5584                    "commandStartedEvent"
  5585                  ],
  5586                  "ignoreCommandMonitoringEvents": [
  5587                    "killCursors"
  5588                  ]
  5589                }
  5590              },
  5591              {
  5592                "database": {
  5593                  "id": "database",
  5594                  "client": "client",
  5595                  "databaseName": "test"
  5596                }
  5597              },
  5598              {
  5599                "collection": {
  5600                  "id": "collection",
  5601                  "database": "database",
  5602                  "collectionName": "coll"
  5603                }
  5604              }
  5605            ]
  5606          }
  5607        },
  5608        {
  5609          "name": "failPoint",
  5610          "object": "testRunner",
  5611          "arguments": {
  5612            "client": "failPointClient",
  5613            "failPoint": {
  5614              "configureFailPoint": "failCommand",
  5615              "mode": {
  5616                "times": 1
  5617              },
  5618              "data": {
  5619                "failCommands": [
  5620                  "dropIndexes"
  5621                ],
  5622                "blockConnection": true,
  5623                "blockTimeMS": 15
  5624              }
  5625            }
  5626          }
  5627        },
  5628        {
  5629          "name": "dropIndex",
  5630          "object": "collection",
  5631          "arguments": {
  5632            "name": "x_1"
  5633          },
  5634          "expectError": {
  5635            "isClientError": false,
  5636            "isTimeoutError": false
  5637          }
  5638        }
  5639      ],
  5640      "expectEvents": [
  5641        {
  5642          "client": "client",
  5643          "events": [
  5644            {
  5645              "commandStartedEvent": {
  5646                "commandName": "dropIndexes",
  5647                "databaseName": "test",
  5648                "command": {
  5649                  "dropIndexes": "coll",
  5650                  "maxTimeMS": {
  5651                    "$$exists": false
  5652                  }
  5653                }
  5654              }
  5655            }
  5656          ]
  5657        }
  5658      ]
  5659    },
  5660    {
  5661      "description": "timeoutMS can be configured on a MongoClient - dropIndexes on collection",
  5662      "operations": [
  5663        {
  5664          "name": "createEntities",
  5665          "object": "testRunner",
  5666          "arguments": {
  5667            "entities": [
  5668              {
  5669                "client": {
  5670                  "id": "client",
  5671                  "uriOptions": {
  5672                    "timeoutMS": 50
  5673                  },
  5674                  "useMultipleMongoses": false,
  5675                  "observeEvents": [
  5676                    "commandStartedEvent"
  5677                  ]
  5678                }
  5679              },
  5680              {
  5681                "database": {
  5682                  "id": "database",
  5683                  "client": "client",
  5684                  "databaseName": "test"
  5685                }
  5686              },
  5687              {
  5688                "collection": {
  5689                  "id": "collection",
  5690                  "database": "database",
  5691                  "collectionName": "coll"
  5692                }
  5693              }
  5694            ]
  5695          }
  5696        },
  5697        {
  5698          "name": "failPoint",
  5699          "object": "testRunner",
  5700          "arguments": {
  5701            "client": "failPointClient",
  5702            "failPoint": {
  5703              "configureFailPoint": "failCommand",
  5704              "mode": {
  5705                "times": 1
  5706              },
  5707              "data": {
  5708                "failCommands": [
  5709                  "dropIndexes"
  5710                ],
  5711                "blockConnection": true,
  5712                "blockTimeMS": 60
  5713              }
  5714            }
  5715          }
  5716        },
  5717        {
  5718          "name": "dropIndexes",
  5719          "object": "collection",
  5720          "expectError": {
  5721            "isTimeoutError": true
  5722          }
  5723        }
  5724      ],
  5725      "expectEvents": [
  5726        {
  5727          "client": "client",
  5728          "events": [
  5729            {
  5730              "commandStartedEvent": {
  5731                "commandName": "dropIndexes",
  5732                "databaseName": "test",
  5733                "command": {
  5734                  "dropIndexes": "coll",
  5735                  "maxTimeMS": {
  5736                    "$$type": [
  5737                      "int",
  5738                      "long"
  5739                    ]
  5740                  }
  5741                }
  5742              }
  5743            }
  5744          ]
  5745        }
  5746      ]
  5747    },
  5748    {
  5749      "description": "timeoutMS can be set to 0 on a MongoClient - dropIndexes on collection",
  5750      "operations": [
  5751        {
  5752          "name": "createEntities",
  5753          "object": "testRunner",
  5754          "arguments": {
  5755            "entities": [
  5756              {
  5757                "client": {
  5758                  "id": "client",
  5759                  "uriOptions": {
  5760                    "timeoutMS": 0
  5761                  },
  5762                  "useMultipleMongoses": false,
  5763                  "observeEvents": [
  5764                    "commandStartedEvent"
  5765                  ],
  5766                  "ignoreCommandMonitoringEvents": [
  5767                    "killCursors"
  5768                  ]
  5769                }
  5770              },
  5771              {
  5772                "database": {
  5773                  "id": "database",
  5774                  "client": "client",
  5775                  "databaseName": "test"
  5776                }
  5777              },
  5778              {
  5779                "collection": {
  5780                  "id": "collection",
  5781                  "database": "database",
  5782                  "collectionName": "coll"
  5783                }
  5784              }
  5785            ]
  5786          }
  5787        },
  5788        {
  5789          "name": "failPoint",
  5790          "object": "testRunner",
  5791          "arguments": {
  5792            "client": "failPointClient",
  5793            "failPoint": {
  5794              "configureFailPoint": "failCommand",
  5795              "mode": {
  5796                "times": 1
  5797              },
  5798              "data": {
  5799                "failCommands": [
  5800                  "dropIndexes"
  5801                ],
  5802                "blockConnection": true,
  5803                "blockTimeMS": 15
  5804              }
  5805            }
  5806          }
  5807        },
  5808        {
  5809          "name": "dropIndexes",
  5810          "object": "collection"
  5811        }
  5812      ],
  5813      "expectEvents": [
  5814        {
  5815          "client": "client",
  5816          "events": [
  5817            {
  5818              "commandStartedEvent": {
  5819                "commandName": "dropIndexes",
  5820                "databaseName": "test",
  5821                "command": {
  5822                  "dropIndexes": "coll",
  5823                  "maxTimeMS": {
  5824                    "$$exists": false
  5825                  }
  5826                }
  5827              }
  5828            }
  5829          ]
  5830        }
  5831      ]
  5832    }
  5833  ]
  5834}

View as plain text