...

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

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

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

View as plain text