...

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

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

     1# Tests in this file are generated from override-operation-timeoutMS.yml.template.
     2
     3description: "timeoutMS can be overridden for an operation"
     4
     5schemaVersion: "1.9"
     6
     7runOnRequirements:
     8  - minServerVersion: "4.4"
     9    topologies: ["replicaset", "sharded-replicaset"]
    10
    11createEntities:
    12  - client:
    13      id: &failPointClient failPointClient
    14      useMultipleMongoses: false
    15  - client:
    16      id: &client client
    17      uriOptions:
    18        timeoutMS: 10
    19      useMultipleMongoses: false
    20      observeEvents:
    21        - commandStartedEvent
    22      ignoreCommandMonitoringEvents:
    23        - killCursors
    24  - database:
    25      id: &database database
    26      client: *client
    27      databaseName: &databaseName test
    28  - collection:
    29      id: &collection collection
    30      database: *database
    31      collectionName: &collectionName coll
    32
    33initialData:
    34  - collectionName: *collectionName
    35    databaseName: *databaseName
    36    documents: []
    37
    38tests:
    39  # For each level operation, we execute two tests:
    40  #
    41  # 1. timeoutMS can be overridden to a non-zero value for an operation. Each test executes an operation using one of
    42  # the entities defined above with an overridden timeoutMS=1000 and configures a fail point to block the operation for
    43  # 15ms so the operation succeeds.
    44  #
    45  # 2. timeoutMS can be overridden to 0 for an operation. Each test executes an operation using the entities defined
    46  # above with an overridden timeoutMS=0 so the operation succeeds.
    47
    48  - description: "timeoutMS can be configured for an operation - listDatabases on client"
    49    operations:
    50      - name: failPoint
    51        object: testRunner
    52        arguments:
    53          client: *failPointClient
    54          failPoint:
    55            configureFailPoint: failCommand
    56            mode: { times: 1 }
    57            data:
    58              failCommands: ["listDatabases"]
    59              blockConnection: true
    60              blockTimeMS: 15
    61      - name: listDatabases
    62        object: *client
    63        arguments:
    64          timeoutMS: 1000
    65          filter: {}
    66
    67
    68    expectEvents:
    69      - client: *client
    70        events:
    71          - commandStartedEvent:
    72              commandName: listDatabases
    73              databaseName: admin
    74              command:
    75                listDatabases: 1
    76                maxTimeMS: { $$type: ["int", "long"] }
    77  - description: "timeoutMS can be set to 0 for an operation - listDatabases on client"
    78    operations:
    79      - name: failPoint
    80        object: testRunner
    81        arguments:
    82          client: *failPointClient
    83          failPoint:
    84            configureFailPoint: failCommand
    85            mode: { times: 1 }
    86            data:
    87              failCommands: ["listDatabases"]
    88              blockConnection: true
    89              blockTimeMS: 15
    90      - name: listDatabases
    91        object: *client
    92        arguments:
    93          timeoutMS: 0
    94          filter: {}
    95
    96
    97    expectEvents:
    98      - client: *client
    99        events:
   100          - commandStartedEvent:
   101              commandName: listDatabases
   102              databaseName: admin
   103              command:
   104                listDatabases: 1
   105                maxTimeMS: { $$exists: false }
   106  - description: "timeoutMS can be configured for an operation - listDatabaseNames on client"
   107    operations:
   108      - name: failPoint
   109        object: testRunner
   110        arguments:
   111          client: *failPointClient
   112          failPoint:
   113            configureFailPoint: failCommand
   114            mode: { times: 1 }
   115            data:
   116              failCommands: ["listDatabases"]
   117              blockConnection: true
   118              blockTimeMS: 15
   119      - name: listDatabaseNames
   120        object: *client
   121        arguments:
   122          timeoutMS: 1000
   123
   124
   125    expectEvents:
   126      - client: *client
   127        events:
   128          - commandStartedEvent:
   129              commandName: listDatabases
   130              databaseName: admin
   131              command:
   132                listDatabases: 1
   133                maxTimeMS: { $$type: ["int", "long"] }
   134  - description: "timeoutMS can be set to 0 for an operation - listDatabaseNames on client"
   135    operations:
   136      - name: failPoint
   137        object: testRunner
   138        arguments:
   139          client: *failPointClient
   140          failPoint:
   141            configureFailPoint: failCommand
   142            mode: { times: 1 }
   143            data:
   144              failCommands: ["listDatabases"]
   145              blockConnection: true
   146              blockTimeMS: 15
   147      - name: listDatabaseNames
   148        object: *client
   149        arguments:
   150          timeoutMS: 0
   151
   152
   153    expectEvents:
   154      - client: *client
   155        events:
   156          - commandStartedEvent:
   157              commandName: listDatabases
   158              databaseName: admin
   159              command:
   160                listDatabases: 1
   161                maxTimeMS: { $$exists: false }
   162  - description: "timeoutMS can be configured for an operation - createChangeStream on client"
   163    operations:
   164      - name: failPoint
   165        object: testRunner
   166        arguments:
   167          client: *failPointClient
   168          failPoint:
   169            configureFailPoint: failCommand
   170            mode: { times: 1 }
   171            data:
   172              failCommands: ["aggregate"]
   173              blockConnection: true
   174              blockTimeMS: 15
   175      - name: createChangeStream
   176        object: *client
   177        arguments:
   178          timeoutMS: 1000
   179          pipeline: []
   180
   181
   182    expectEvents:
   183      - client: *client
   184        events:
   185          - commandStartedEvent:
   186              commandName: aggregate
   187              databaseName: admin
   188              command:
   189                aggregate: 1
   190                maxTimeMS: { $$type: ["int", "long"] }
   191  - description: "timeoutMS can be set to 0 for an operation - createChangeStream on client"
   192    operations:
   193      - name: failPoint
   194        object: testRunner
   195        arguments:
   196          client: *failPointClient
   197          failPoint:
   198            configureFailPoint: failCommand
   199            mode: { times: 1 }
   200            data:
   201              failCommands: ["aggregate"]
   202              blockConnection: true
   203              blockTimeMS: 15
   204      - name: createChangeStream
   205        object: *client
   206        arguments:
   207          timeoutMS: 0
   208          pipeline: []
   209
   210
   211    expectEvents:
   212      - client: *client
   213        events:
   214          - commandStartedEvent:
   215              commandName: aggregate
   216              databaseName: admin
   217              command:
   218                aggregate: 1
   219                maxTimeMS: { $$exists: false }
   220  - description: "timeoutMS can be configured for an operation - aggregate on database"
   221    operations:
   222      - name: failPoint
   223        object: testRunner
   224        arguments:
   225          client: *failPointClient
   226          failPoint:
   227            configureFailPoint: failCommand
   228            mode: { times: 1 }
   229            data:
   230              failCommands: ["aggregate"]
   231              blockConnection: true
   232              blockTimeMS: 15
   233      - name: aggregate
   234        object: *database
   235        arguments:
   236          timeoutMS: 1000
   237          pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ]
   238
   239
   240    expectEvents:
   241      - client: *client
   242        events:
   243          - commandStartedEvent:
   244              commandName: aggregate
   245              databaseName: *databaseName
   246              command:
   247                aggregate: 1
   248                maxTimeMS: { $$type: ["int", "long"] }
   249  - description: "timeoutMS can be set to 0 for an operation - aggregate on database"
   250    operations:
   251      - name: failPoint
   252        object: testRunner
   253        arguments:
   254          client: *failPointClient
   255          failPoint:
   256            configureFailPoint: failCommand
   257            mode: { times: 1 }
   258            data:
   259              failCommands: ["aggregate"]
   260              blockConnection: true
   261              blockTimeMS: 15
   262      - name: aggregate
   263        object: *database
   264        arguments:
   265          timeoutMS: 0
   266          pipeline: [ { $listLocalSessions: {} }, { $limit: 1 } ]
   267
   268
   269    expectEvents:
   270      - client: *client
   271        events:
   272          - commandStartedEvent:
   273              commandName: aggregate
   274              databaseName: *databaseName
   275              command:
   276                aggregate: 1
   277                maxTimeMS: { $$exists: false }
   278  - description: "timeoutMS can be configured for an operation - listCollections on database"
   279    operations:
   280      - name: failPoint
   281        object: testRunner
   282        arguments:
   283          client: *failPointClient
   284          failPoint:
   285            configureFailPoint: failCommand
   286            mode: { times: 1 }
   287            data:
   288              failCommands: ["listCollections"]
   289              blockConnection: true
   290              blockTimeMS: 15
   291      - name: listCollections
   292        object: *database
   293        arguments:
   294          timeoutMS: 1000
   295          filter: {}
   296
   297
   298    expectEvents:
   299      - client: *client
   300        events:
   301          - commandStartedEvent:
   302              commandName: listCollections
   303              databaseName: *databaseName
   304              command:
   305                listCollections: 1
   306                maxTimeMS: { $$type: ["int", "long"] }
   307  - description: "timeoutMS can be set to 0 for an operation - listCollections on database"
   308    operations:
   309      - name: failPoint
   310        object: testRunner
   311        arguments:
   312          client: *failPointClient
   313          failPoint:
   314            configureFailPoint: failCommand
   315            mode: { times: 1 }
   316            data:
   317              failCommands: ["listCollections"]
   318              blockConnection: true
   319              blockTimeMS: 15
   320      - name: listCollections
   321        object: *database
   322        arguments:
   323          timeoutMS: 0
   324          filter: {}
   325
   326
   327    expectEvents:
   328      - client: *client
   329        events:
   330          - commandStartedEvent:
   331              commandName: listCollections
   332              databaseName: *databaseName
   333              command:
   334                listCollections: 1
   335                maxTimeMS: { $$exists: false }
   336  - description: "timeoutMS can be configured for an operation - listCollectionNames on database"
   337    operations:
   338      - name: failPoint
   339        object: testRunner
   340        arguments:
   341          client: *failPointClient
   342          failPoint:
   343            configureFailPoint: failCommand
   344            mode: { times: 1 }
   345            data:
   346              failCommands: ["listCollections"]
   347              blockConnection: true
   348              blockTimeMS: 15
   349      - name: listCollectionNames
   350        object: *database
   351        arguments:
   352          timeoutMS: 1000
   353          filter: {}
   354
   355
   356    expectEvents:
   357      - client: *client
   358        events:
   359          - commandStartedEvent:
   360              commandName: listCollections
   361              databaseName: *databaseName
   362              command:
   363                listCollections: 1
   364                maxTimeMS: { $$type: ["int", "long"] }
   365  - description: "timeoutMS can be set to 0 for an operation - listCollectionNames on database"
   366    operations:
   367      - name: failPoint
   368        object: testRunner
   369        arguments:
   370          client: *failPointClient
   371          failPoint:
   372            configureFailPoint: failCommand
   373            mode: { times: 1 }
   374            data:
   375              failCommands: ["listCollections"]
   376              blockConnection: true
   377              blockTimeMS: 15
   378      - name: listCollectionNames
   379        object: *database
   380        arguments:
   381          timeoutMS: 0
   382          filter: {}
   383
   384
   385    expectEvents:
   386      - client: *client
   387        events:
   388          - commandStartedEvent:
   389              commandName: listCollections
   390              databaseName: *databaseName
   391              command:
   392                listCollections: 1
   393                maxTimeMS: { $$exists: false }
   394  - description: "timeoutMS can be configured for an operation - runCommand on database"
   395    operations:
   396      - name: failPoint
   397        object: testRunner
   398        arguments:
   399          client: *failPointClient
   400          failPoint:
   401            configureFailPoint: failCommand
   402            mode: { times: 1 }
   403            data:
   404              failCommands: ["ping"]
   405              blockConnection: true
   406              blockTimeMS: 15
   407      - name: runCommand
   408        object: *database
   409        arguments:
   410          timeoutMS: 1000
   411          command: { ping: 1 }
   412          commandName: ping
   413
   414
   415    expectEvents:
   416      - client: *client
   417        events:
   418          - commandStartedEvent:
   419              commandName: ping
   420              databaseName: *databaseName
   421              command:
   422                ping: 1
   423                maxTimeMS: { $$type: ["int", "long"] }
   424  - description: "timeoutMS can be set to 0 for an operation - runCommand on database"
   425    operations:
   426      - name: failPoint
   427        object: testRunner
   428        arguments:
   429          client: *failPointClient
   430          failPoint:
   431            configureFailPoint: failCommand
   432            mode: { times: 1 }
   433            data:
   434              failCommands: ["ping"]
   435              blockConnection: true
   436              blockTimeMS: 15
   437      - name: runCommand
   438        object: *database
   439        arguments:
   440          timeoutMS: 0
   441          command: { ping: 1 }
   442          commandName: ping
   443
   444
   445    expectEvents:
   446      - client: *client
   447        events:
   448          - commandStartedEvent:
   449              commandName: ping
   450              databaseName: *databaseName
   451              command:
   452                ping: 1
   453                maxTimeMS: { $$exists: false }
   454  - description: "timeoutMS can be configured for an operation - createChangeStream on database"
   455    operations:
   456      - name: failPoint
   457        object: testRunner
   458        arguments:
   459          client: *failPointClient
   460          failPoint:
   461            configureFailPoint: failCommand
   462            mode: { times: 1 }
   463            data:
   464              failCommands: ["aggregate"]
   465              blockConnection: true
   466              blockTimeMS: 15
   467      - name: createChangeStream
   468        object: *database
   469        arguments:
   470          timeoutMS: 1000
   471          pipeline: []
   472
   473
   474    expectEvents:
   475      - client: *client
   476        events:
   477          - commandStartedEvent:
   478              commandName: aggregate
   479              databaseName: *databaseName
   480              command:
   481                aggregate: 1
   482                maxTimeMS: { $$type: ["int", "long"] }
   483  - description: "timeoutMS can be set to 0 for an operation - createChangeStream on database"
   484    operations:
   485      - name: failPoint
   486        object: testRunner
   487        arguments:
   488          client: *failPointClient
   489          failPoint:
   490            configureFailPoint: failCommand
   491            mode: { times: 1 }
   492            data:
   493              failCommands: ["aggregate"]
   494              blockConnection: true
   495              blockTimeMS: 15
   496      - name: createChangeStream
   497        object: *database
   498        arguments:
   499          timeoutMS: 0
   500          pipeline: []
   501
   502
   503    expectEvents:
   504      - client: *client
   505        events:
   506          - commandStartedEvent:
   507              commandName: aggregate
   508              databaseName: *databaseName
   509              command:
   510                aggregate: 1
   511                maxTimeMS: { $$exists: false }
   512  - description: "timeoutMS can be configured for an operation - aggregate on collection"
   513    operations:
   514      - name: failPoint
   515        object: testRunner
   516        arguments:
   517          client: *failPointClient
   518          failPoint:
   519            configureFailPoint: failCommand
   520            mode: { times: 1 }
   521            data:
   522              failCommands: ["aggregate"]
   523              blockConnection: true
   524              blockTimeMS: 15
   525      - name: aggregate
   526        object: *collection
   527        arguments:
   528          timeoutMS: 1000
   529          pipeline: []
   530
   531
   532    expectEvents:
   533      - client: *client
   534        events:
   535          - commandStartedEvent:
   536              commandName: aggregate
   537              databaseName: *databaseName
   538              command:
   539                aggregate: *collectionName
   540                maxTimeMS: { $$type: ["int", "long"] }
   541  - description: "timeoutMS can be set to 0 for an operation - aggregate on collection"
   542    operations:
   543      - name: failPoint
   544        object: testRunner
   545        arguments:
   546          client: *failPointClient
   547          failPoint:
   548            configureFailPoint: failCommand
   549            mode: { times: 1 }
   550            data:
   551              failCommands: ["aggregate"]
   552              blockConnection: true
   553              blockTimeMS: 15
   554      - name: aggregate
   555        object: *collection
   556        arguments:
   557          timeoutMS: 0
   558          pipeline: []
   559
   560
   561    expectEvents:
   562      - client: *client
   563        events:
   564          - commandStartedEvent:
   565              commandName: aggregate
   566              databaseName: *databaseName
   567              command:
   568                aggregate: *collectionName
   569                maxTimeMS: { $$exists: false }
   570  - description: "timeoutMS can be configured for an operation - count on collection"
   571    operations:
   572      - name: failPoint
   573        object: testRunner
   574        arguments:
   575          client: *failPointClient
   576          failPoint:
   577            configureFailPoint: failCommand
   578            mode: { times: 1 }
   579            data:
   580              failCommands: ["count"]
   581              blockConnection: true
   582              blockTimeMS: 15
   583      - name: count
   584        object: *collection
   585        arguments:
   586          timeoutMS: 1000
   587          filter: {}
   588
   589
   590    expectEvents:
   591      - client: *client
   592        events:
   593          - commandStartedEvent:
   594              commandName: count
   595              databaseName: *databaseName
   596              command:
   597                count: *collectionName
   598                maxTimeMS: { $$type: ["int", "long"] }
   599  - description: "timeoutMS can be set to 0 for an operation - count on collection"
   600    operations:
   601      - name: failPoint
   602        object: testRunner
   603        arguments:
   604          client: *failPointClient
   605          failPoint:
   606            configureFailPoint: failCommand
   607            mode: { times: 1 }
   608            data:
   609              failCommands: ["count"]
   610              blockConnection: true
   611              blockTimeMS: 15
   612      - name: count
   613        object: *collection
   614        arguments:
   615          timeoutMS: 0
   616          filter: {}
   617
   618
   619    expectEvents:
   620      - client: *client
   621        events:
   622          - commandStartedEvent:
   623              commandName: count
   624              databaseName: *databaseName
   625              command:
   626                count: *collectionName
   627                maxTimeMS: { $$exists: false }
   628  - description: "timeoutMS can be configured for an operation - countDocuments on collection"
   629    operations:
   630      - name: failPoint
   631        object: testRunner
   632        arguments:
   633          client: *failPointClient
   634          failPoint:
   635            configureFailPoint: failCommand
   636            mode: { times: 1 }
   637            data:
   638              failCommands: ["aggregate"]
   639              blockConnection: true
   640              blockTimeMS: 15
   641      - name: countDocuments
   642        object: *collection
   643        arguments:
   644          timeoutMS: 1000
   645          filter: {}
   646
   647
   648    expectEvents:
   649      - client: *client
   650        events:
   651          - commandStartedEvent:
   652              commandName: aggregate
   653              databaseName: *databaseName
   654              command:
   655                aggregate: *collectionName
   656                maxTimeMS: { $$type: ["int", "long"] }
   657  - description: "timeoutMS can be set to 0 for an operation - countDocuments on collection"
   658    operations:
   659      - name: failPoint
   660        object: testRunner
   661        arguments:
   662          client: *failPointClient
   663          failPoint:
   664            configureFailPoint: failCommand
   665            mode: { times: 1 }
   666            data:
   667              failCommands: ["aggregate"]
   668              blockConnection: true
   669              blockTimeMS: 15
   670      - name: countDocuments
   671        object: *collection
   672        arguments:
   673          timeoutMS: 0
   674          filter: {}
   675
   676
   677    expectEvents:
   678      - client: *client
   679        events:
   680          - commandStartedEvent:
   681              commandName: aggregate
   682              databaseName: *databaseName
   683              command:
   684                aggregate: *collectionName
   685                maxTimeMS: { $$exists: false }
   686  - description: "timeoutMS can be configured for an operation - estimatedDocumentCount on collection"
   687    operations:
   688      - name: failPoint
   689        object: testRunner
   690        arguments:
   691          client: *failPointClient
   692          failPoint:
   693            configureFailPoint: failCommand
   694            mode: { times: 1 }
   695            data:
   696              failCommands: ["count"]
   697              blockConnection: true
   698              blockTimeMS: 15
   699      - name: estimatedDocumentCount
   700        object: *collection
   701        arguments:
   702          timeoutMS: 1000
   703
   704
   705    expectEvents:
   706      - client: *client
   707        events:
   708          - commandStartedEvent:
   709              commandName: count
   710              databaseName: *databaseName
   711              command:
   712                count: *collectionName
   713                maxTimeMS: { $$type: ["int", "long"] }
   714  - description: "timeoutMS can be set to 0 for an operation - estimatedDocumentCount on collection"
   715    operations:
   716      - name: failPoint
   717        object: testRunner
   718        arguments:
   719          client: *failPointClient
   720          failPoint:
   721            configureFailPoint: failCommand
   722            mode: { times: 1 }
   723            data:
   724              failCommands: ["count"]
   725              blockConnection: true
   726              blockTimeMS: 15
   727      - name: estimatedDocumentCount
   728        object: *collection
   729        arguments:
   730          timeoutMS: 0
   731
   732
   733    expectEvents:
   734      - client: *client
   735        events:
   736          - commandStartedEvent:
   737              commandName: count
   738              databaseName: *databaseName
   739              command:
   740                count: *collectionName
   741                maxTimeMS: { $$exists: false }
   742  - description: "timeoutMS can be configured for an operation - distinct on collection"
   743    operations:
   744      - name: failPoint
   745        object: testRunner
   746        arguments:
   747          client: *failPointClient
   748          failPoint:
   749            configureFailPoint: failCommand
   750            mode: { times: 1 }
   751            data:
   752              failCommands: ["distinct"]
   753              blockConnection: true
   754              blockTimeMS: 15
   755      - name: distinct
   756        object: *collection
   757        arguments:
   758          timeoutMS: 1000
   759          fieldName: x
   760          filter: {}
   761
   762
   763    expectEvents:
   764      - client: *client
   765        events:
   766          - commandStartedEvent:
   767              commandName: distinct
   768              databaseName: *databaseName
   769              command:
   770                distinct: *collectionName
   771                maxTimeMS: { $$type: ["int", "long"] }
   772  - description: "timeoutMS can be set to 0 for an operation - distinct on collection"
   773    operations:
   774      - name: failPoint
   775        object: testRunner
   776        arguments:
   777          client: *failPointClient
   778          failPoint:
   779            configureFailPoint: failCommand
   780            mode: { times: 1 }
   781            data:
   782              failCommands: ["distinct"]
   783              blockConnection: true
   784              blockTimeMS: 15
   785      - name: distinct
   786        object: *collection
   787        arguments:
   788          timeoutMS: 0
   789          fieldName: x
   790          filter: {}
   791
   792
   793    expectEvents:
   794      - client: *client
   795        events:
   796          - commandStartedEvent:
   797              commandName: distinct
   798              databaseName: *databaseName
   799              command:
   800                distinct: *collectionName
   801                maxTimeMS: { $$exists: false }
   802  - description: "timeoutMS can be configured for an operation - find on collection"
   803    operations:
   804      - name: failPoint
   805        object: testRunner
   806        arguments:
   807          client: *failPointClient
   808          failPoint:
   809            configureFailPoint: failCommand
   810            mode: { times: 1 }
   811            data:
   812              failCommands: ["find"]
   813              blockConnection: true
   814              blockTimeMS: 15
   815      - name: find
   816        object: *collection
   817        arguments:
   818          timeoutMS: 1000
   819          filter: {}
   820
   821
   822    expectEvents:
   823      - client: *client
   824        events:
   825          - commandStartedEvent:
   826              commandName: find
   827              databaseName: *databaseName
   828              command:
   829                find: *collectionName
   830                maxTimeMS: { $$type: ["int", "long"] }
   831  - description: "timeoutMS can be set to 0 for an operation - find on collection"
   832    operations:
   833      - name: failPoint
   834        object: testRunner
   835        arguments:
   836          client: *failPointClient
   837          failPoint:
   838            configureFailPoint: failCommand
   839            mode: { times: 1 }
   840            data:
   841              failCommands: ["find"]
   842              blockConnection: true
   843              blockTimeMS: 15
   844      - name: find
   845        object: *collection
   846        arguments:
   847          timeoutMS: 0
   848          filter: {}
   849
   850
   851    expectEvents:
   852      - client: *client
   853        events:
   854          - commandStartedEvent:
   855              commandName: find
   856              databaseName: *databaseName
   857              command:
   858                find: *collectionName
   859                maxTimeMS: { $$exists: false }
   860  - description: "timeoutMS can be configured for an operation - findOne on collection"
   861    operations:
   862      - name: failPoint
   863        object: testRunner
   864        arguments:
   865          client: *failPointClient
   866          failPoint:
   867            configureFailPoint: failCommand
   868            mode: { times: 1 }
   869            data:
   870              failCommands: ["find"]
   871              blockConnection: true
   872              blockTimeMS: 15
   873      - name: findOne
   874        object: *collection
   875        arguments:
   876          timeoutMS: 1000
   877          filter: {}
   878
   879
   880    expectEvents:
   881      - client: *client
   882        events:
   883          - commandStartedEvent:
   884              commandName: find
   885              databaseName: *databaseName
   886              command:
   887                find: *collectionName
   888                maxTimeMS: { $$type: ["int", "long"] }
   889  - description: "timeoutMS can be set to 0 for an operation - findOne on collection"
   890    operations:
   891      - name: failPoint
   892        object: testRunner
   893        arguments:
   894          client: *failPointClient
   895          failPoint:
   896            configureFailPoint: failCommand
   897            mode: { times: 1 }
   898            data:
   899              failCommands: ["find"]
   900              blockConnection: true
   901              blockTimeMS: 15
   902      - name: findOne
   903        object: *collection
   904        arguments:
   905          timeoutMS: 0
   906          filter: {}
   907
   908
   909    expectEvents:
   910      - client: *client
   911        events:
   912          - commandStartedEvent:
   913              commandName: find
   914              databaseName: *databaseName
   915              command:
   916                find: *collectionName
   917                maxTimeMS: { $$exists: false }
   918  - description: "timeoutMS can be configured for an operation - listIndexes on collection"
   919    operations:
   920      - name: failPoint
   921        object: testRunner
   922        arguments:
   923          client: *failPointClient
   924          failPoint:
   925            configureFailPoint: failCommand
   926            mode: { times: 1 }
   927            data:
   928              failCommands: ["listIndexes"]
   929              blockConnection: true
   930              blockTimeMS: 15
   931      - name: listIndexes
   932        object: *collection
   933        arguments:
   934          timeoutMS: 1000
   935
   936
   937    expectEvents:
   938      - client: *client
   939        events:
   940          - commandStartedEvent:
   941              commandName: listIndexes
   942              databaseName: *databaseName
   943              command:
   944                listIndexes: *collectionName
   945                maxTimeMS: { $$type: ["int", "long"] }
   946  - description: "timeoutMS can be set to 0 for an operation - listIndexes on collection"
   947    operations:
   948      - name: failPoint
   949        object: testRunner
   950        arguments:
   951          client: *failPointClient
   952          failPoint:
   953            configureFailPoint: failCommand
   954            mode: { times: 1 }
   955            data:
   956              failCommands: ["listIndexes"]
   957              blockConnection: true
   958              blockTimeMS: 15
   959      - name: listIndexes
   960        object: *collection
   961        arguments:
   962          timeoutMS: 0
   963
   964
   965    expectEvents:
   966      - client: *client
   967        events:
   968          - commandStartedEvent:
   969              commandName: listIndexes
   970              databaseName: *databaseName
   971              command:
   972                listIndexes: *collectionName
   973                maxTimeMS: { $$exists: false }
   974  - description: "timeoutMS can be configured for an operation - listIndexNames on collection"
   975    operations:
   976      - name: failPoint
   977        object: testRunner
   978        arguments:
   979          client: *failPointClient
   980          failPoint:
   981            configureFailPoint: failCommand
   982            mode: { times: 1 }
   983            data:
   984              failCommands: ["listIndexes"]
   985              blockConnection: true
   986              blockTimeMS: 15
   987      - name: listIndexNames
   988        object: *collection
   989        arguments:
   990          timeoutMS: 1000
   991
   992
   993    expectEvents:
   994      - client: *client
   995        events:
   996          - commandStartedEvent:
   997              commandName: listIndexes
   998              databaseName: *databaseName
   999              command:
  1000                listIndexes: *collectionName
  1001                maxTimeMS: { $$type: ["int", "long"] }
  1002  - description: "timeoutMS can be set to 0 for an operation - listIndexNames on collection"
  1003    operations:
  1004      - name: failPoint
  1005        object: testRunner
  1006        arguments:
  1007          client: *failPointClient
  1008          failPoint:
  1009            configureFailPoint: failCommand
  1010            mode: { times: 1 }
  1011            data:
  1012              failCommands: ["listIndexes"]
  1013              blockConnection: true
  1014              blockTimeMS: 15
  1015      - name: listIndexNames
  1016        object: *collection
  1017        arguments:
  1018          timeoutMS: 0
  1019
  1020
  1021    expectEvents:
  1022      - client: *client
  1023        events:
  1024          - commandStartedEvent:
  1025              commandName: listIndexes
  1026              databaseName: *databaseName
  1027              command:
  1028                listIndexes: *collectionName
  1029                maxTimeMS: { $$exists: false }
  1030  - description: "timeoutMS can be configured for an operation - createChangeStream on collection"
  1031    operations:
  1032      - name: failPoint
  1033        object: testRunner
  1034        arguments:
  1035          client: *failPointClient
  1036          failPoint:
  1037            configureFailPoint: failCommand
  1038            mode: { times: 1 }
  1039            data:
  1040              failCommands: ["aggregate"]
  1041              blockConnection: true
  1042              blockTimeMS: 15
  1043      - name: createChangeStream
  1044        object: *collection
  1045        arguments:
  1046          timeoutMS: 1000
  1047          pipeline: []
  1048
  1049
  1050    expectEvents:
  1051      - client: *client
  1052        events:
  1053          - commandStartedEvent:
  1054              commandName: aggregate
  1055              databaseName: *databaseName
  1056              command:
  1057                aggregate: *collectionName
  1058                maxTimeMS: { $$type: ["int", "long"] }
  1059  - description: "timeoutMS can be set to 0 for an operation - createChangeStream on collection"
  1060    operations:
  1061      - name: failPoint
  1062        object: testRunner
  1063        arguments:
  1064          client: *failPointClient
  1065          failPoint:
  1066            configureFailPoint: failCommand
  1067            mode: { times: 1 }
  1068            data:
  1069              failCommands: ["aggregate"]
  1070              blockConnection: true
  1071              blockTimeMS: 15
  1072      - name: createChangeStream
  1073        object: *collection
  1074        arguments:
  1075          timeoutMS: 0
  1076          pipeline: []
  1077
  1078
  1079    expectEvents:
  1080      - client: *client
  1081        events:
  1082          - commandStartedEvent:
  1083              commandName: aggregate
  1084              databaseName: *databaseName
  1085              command:
  1086                aggregate: *collectionName
  1087                maxTimeMS: { $$exists: false }
  1088  - description: "timeoutMS can be configured for an operation - insertOne on collection"
  1089    operations:
  1090      - name: failPoint
  1091        object: testRunner
  1092        arguments:
  1093          client: *failPointClient
  1094          failPoint:
  1095            configureFailPoint: failCommand
  1096            mode: { times: 1 }
  1097            data:
  1098              failCommands: ["insert"]
  1099              blockConnection: true
  1100              blockTimeMS: 15
  1101      - name: insertOne
  1102        object: *collection
  1103        arguments:
  1104          timeoutMS: 1000
  1105          document: { x: 1 }
  1106
  1107
  1108    expectEvents:
  1109      - client: *client
  1110        events:
  1111          - commandStartedEvent:
  1112              commandName: insert
  1113              databaseName: *databaseName
  1114              command:
  1115                insert: *collectionName
  1116                maxTimeMS: { $$type: ["int", "long"] }
  1117  - description: "timeoutMS can be set to 0 for an operation - insertOne on collection"
  1118    operations:
  1119      - name: failPoint
  1120        object: testRunner
  1121        arguments:
  1122          client: *failPointClient
  1123          failPoint:
  1124            configureFailPoint: failCommand
  1125            mode: { times: 1 }
  1126            data:
  1127              failCommands: ["insert"]
  1128              blockConnection: true
  1129              blockTimeMS: 15
  1130      - name: insertOne
  1131        object: *collection
  1132        arguments:
  1133          timeoutMS: 0
  1134          document: { x: 1 }
  1135
  1136
  1137    expectEvents:
  1138      - client: *client
  1139        events:
  1140          - commandStartedEvent:
  1141              commandName: insert
  1142              databaseName: *databaseName
  1143              command:
  1144                insert: *collectionName
  1145                maxTimeMS: { $$exists: false }
  1146  - description: "timeoutMS can be configured for an operation - insertMany on collection"
  1147    operations:
  1148      - name: failPoint
  1149        object: testRunner
  1150        arguments:
  1151          client: *failPointClient
  1152          failPoint:
  1153            configureFailPoint: failCommand
  1154            mode: { times: 1 }
  1155            data:
  1156              failCommands: ["insert"]
  1157              blockConnection: true
  1158              blockTimeMS: 15
  1159      - name: insertMany
  1160        object: *collection
  1161        arguments:
  1162          timeoutMS: 1000
  1163          documents:
  1164            - { x: 1 }
  1165
  1166
  1167    expectEvents:
  1168      - client: *client
  1169        events:
  1170          - commandStartedEvent:
  1171              commandName: insert
  1172              databaseName: *databaseName
  1173              command:
  1174                insert: *collectionName
  1175                maxTimeMS: { $$type: ["int", "long"] }
  1176  - description: "timeoutMS can be set to 0 for an operation - insertMany on collection"
  1177    operations:
  1178      - name: failPoint
  1179        object: testRunner
  1180        arguments:
  1181          client: *failPointClient
  1182          failPoint:
  1183            configureFailPoint: failCommand
  1184            mode: { times: 1 }
  1185            data:
  1186              failCommands: ["insert"]
  1187              blockConnection: true
  1188              blockTimeMS: 15
  1189      - name: insertMany
  1190        object: *collection
  1191        arguments:
  1192          timeoutMS: 0
  1193          documents:
  1194            - { x: 1 }
  1195
  1196
  1197    expectEvents:
  1198      - client: *client
  1199        events:
  1200          - commandStartedEvent:
  1201              commandName: insert
  1202              databaseName: *databaseName
  1203              command:
  1204                insert: *collectionName
  1205                maxTimeMS: { $$exists: false }
  1206  - description: "timeoutMS can be configured for an operation - deleteOne on collection"
  1207    operations:
  1208      - name: failPoint
  1209        object: testRunner
  1210        arguments:
  1211          client: *failPointClient
  1212          failPoint:
  1213            configureFailPoint: failCommand
  1214            mode: { times: 1 }
  1215            data:
  1216              failCommands: ["delete"]
  1217              blockConnection: true
  1218              blockTimeMS: 15
  1219      - name: deleteOne
  1220        object: *collection
  1221        arguments:
  1222          timeoutMS: 1000
  1223          filter: {}
  1224
  1225
  1226    expectEvents:
  1227      - client: *client
  1228        events:
  1229          - commandStartedEvent:
  1230              commandName: delete
  1231              databaseName: *databaseName
  1232              command:
  1233                delete: *collectionName
  1234                maxTimeMS: { $$type: ["int", "long"] }
  1235  - description: "timeoutMS can be set to 0 for an operation - deleteOne on collection"
  1236    operations:
  1237      - name: failPoint
  1238        object: testRunner
  1239        arguments:
  1240          client: *failPointClient
  1241          failPoint:
  1242            configureFailPoint: failCommand
  1243            mode: { times: 1 }
  1244            data:
  1245              failCommands: ["delete"]
  1246              blockConnection: true
  1247              blockTimeMS: 15
  1248      - name: deleteOne
  1249        object: *collection
  1250        arguments:
  1251          timeoutMS: 0
  1252          filter: {}
  1253
  1254
  1255    expectEvents:
  1256      - client: *client
  1257        events:
  1258          - commandStartedEvent:
  1259              commandName: delete
  1260              databaseName: *databaseName
  1261              command:
  1262                delete: *collectionName
  1263                maxTimeMS: { $$exists: false }
  1264  - description: "timeoutMS can be configured for an operation - deleteMany on collection"
  1265    operations:
  1266      - name: failPoint
  1267        object: testRunner
  1268        arguments:
  1269          client: *failPointClient
  1270          failPoint:
  1271            configureFailPoint: failCommand
  1272            mode: { times: 1 }
  1273            data:
  1274              failCommands: ["delete"]
  1275              blockConnection: true
  1276              blockTimeMS: 15
  1277      - name: deleteMany
  1278        object: *collection
  1279        arguments:
  1280          timeoutMS: 1000
  1281          filter: {}
  1282
  1283
  1284    expectEvents:
  1285      - client: *client
  1286        events:
  1287          - commandStartedEvent:
  1288              commandName: delete
  1289              databaseName: *databaseName
  1290              command:
  1291                delete: *collectionName
  1292                maxTimeMS: { $$type: ["int", "long"] }
  1293  - description: "timeoutMS can be set to 0 for an operation - deleteMany on collection"
  1294    operations:
  1295      - name: failPoint
  1296        object: testRunner
  1297        arguments:
  1298          client: *failPointClient
  1299          failPoint:
  1300            configureFailPoint: failCommand
  1301            mode: { times: 1 }
  1302            data:
  1303              failCommands: ["delete"]
  1304              blockConnection: true
  1305              blockTimeMS: 15
  1306      - name: deleteMany
  1307        object: *collection
  1308        arguments:
  1309          timeoutMS: 0
  1310          filter: {}
  1311
  1312
  1313    expectEvents:
  1314      - client: *client
  1315        events:
  1316          - commandStartedEvent:
  1317              commandName: delete
  1318              databaseName: *databaseName
  1319              command:
  1320                delete: *collectionName
  1321                maxTimeMS: { $$exists: false }
  1322  - description: "timeoutMS can be configured for an operation - replaceOne on collection"
  1323    operations:
  1324      - name: failPoint
  1325        object: testRunner
  1326        arguments:
  1327          client: *failPointClient
  1328          failPoint:
  1329            configureFailPoint: failCommand
  1330            mode: { times: 1 }
  1331            data:
  1332              failCommands: ["update"]
  1333              blockConnection: true
  1334              blockTimeMS: 15
  1335      - name: replaceOne
  1336        object: *collection
  1337        arguments:
  1338          timeoutMS: 1000
  1339          filter: {}
  1340          replacement: { x: 1 }
  1341
  1342
  1343    expectEvents:
  1344      - client: *client
  1345        events:
  1346          - commandStartedEvent:
  1347              commandName: update
  1348              databaseName: *databaseName
  1349              command:
  1350                update: *collectionName
  1351                maxTimeMS: { $$type: ["int", "long"] }
  1352  - description: "timeoutMS can be set to 0 for an operation - replaceOne on collection"
  1353    operations:
  1354      - name: failPoint
  1355        object: testRunner
  1356        arguments:
  1357          client: *failPointClient
  1358          failPoint:
  1359            configureFailPoint: failCommand
  1360            mode: { times: 1 }
  1361            data:
  1362              failCommands: ["update"]
  1363              blockConnection: true
  1364              blockTimeMS: 15
  1365      - name: replaceOne
  1366        object: *collection
  1367        arguments:
  1368          timeoutMS: 0
  1369          filter: {}
  1370          replacement: { x: 1 }
  1371
  1372
  1373    expectEvents:
  1374      - client: *client
  1375        events:
  1376          - commandStartedEvent:
  1377              commandName: update
  1378              databaseName: *databaseName
  1379              command:
  1380                update: *collectionName
  1381                maxTimeMS: { $$exists: false }
  1382  - description: "timeoutMS can be configured for an operation - updateOne on collection"
  1383    operations:
  1384      - name: failPoint
  1385        object: testRunner
  1386        arguments:
  1387          client: *failPointClient
  1388          failPoint:
  1389            configureFailPoint: failCommand
  1390            mode: { times: 1 }
  1391            data:
  1392              failCommands: ["update"]
  1393              blockConnection: true
  1394              blockTimeMS: 15
  1395      - name: updateOne
  1396        object: *collection
  1397        arguments:
  1398          timeoutMS: 1000
  1399          filter: {}
  1400          update: { $set: { x: 1 } }
  1401
  1402
  1403    expectEvents:
  1404      - client: *client
  1405        events:
  1406          - commandStartedEvent:
  1407              commandName: update
  1408              databaseName: *databaseName
  1409              command:
  1410                update: *collectionName
  1411                maxTimeMS: { $$type: ["int", "long"] }
  1412  - description: "timeoutMS can be set to 0 for an operation - updateOne on collection"
  1413    operations:
  1414      - name: failPoint
  1415        object: testRunner
  1416        arguments:
  1417          client: *failPointClient
  1418          failPoint:
  1419            configureFailPoint: failCommand
  1420            mode: { times: 1 }
  1421            data:
  1422              failCommands: ["update"]
  1423              blockConnection: true
  1424              blockTimeMS: 15
  1425      - name: updateOne
  1426        object: *collection
  1427        arguments:
  1428          timeoutMS: 0
  1429          filter: {}
  1430          update: { $set: { x: 1 } }
  1431
  1432
  1433    expectEvents:
  1434      - client: *client
  1435        events:
  1436          - commandStartedEvent:
  1437              commandName: update
  1438              databaseName: *databaseName
  1439              command:
  1440                update: *collectionName
  1441                maxTimeMS: { $$exists: false }
  1442  - description: "timeoutMS can be configured for an operation - updateMany on collection"
  1443    operations:
  1444      - name: failPoint
  1445        object: testRunner
  1446        arguments:
  1447          client: *failPointClient
  1448          failPoint:
  1449            configureFailPoint: failCommand
  1450            mode: { times: 1 }
  1451            data:
  1452              failCommands: ["update"]
  1453              blockConnection: true
  1454              blockTimeMS: 15
  1455      - name: updateMany
  1456        object: *collection
  1457        arguments:
  1458          timeoutMS: 1000
  1459          filter: {}
  1460          update: { $set: { x: 1 } }
  1461
  1462
  1463    expectEvents:
  1464      - client: *client
  1465        events:
  1466          - commandStartedEvent:
  1467              commandName: update
  1468              databaseName: *databaseName
  1469              command:
  1470                update: *collectionName
  1471                maxTimeMS: { $$type: ["int", "long"] }
  1472  - description: "timeoutMS can be set to 0 for an operation - updateMany on collection"
  1473    operations:
  1474      - name: failPoint
  1475        object: testRunner
  1476        arguments:
  1477          client: *failPointClient
  1478          failPoint:
  1479            configureFailPoint: failCommand
  1480            mode: { times: 1 }
  1481            data:
  1482              failCommands: ["update"]
  1483              blockConnection: true
  1484              blockTimeMS: 15
  1485      - name: updateMany
  1486        object: *collection
  1487        arguments:
  1488          timeoutMS: 0
  1489          filter: {}
  1490          update: { $set: { x: 1 } }
  1491
  1492
  1493    expectEvents:
  1494      - client: *client
  1495        events:
  1496          - commandStartedEvent:
  1497              commandName: update
  1498              databaseName: *databaseName
  1499              command:
  1500                update: *collectionName
  1501                maxTimeMS: { $$exists: false }
  1502  - description: "timeoutMS can be configured for an operation - findOneAndDelete on collection"
  1503    operations:
  1504      - name: failPoint
  1505        object: testRunner
  1506        arguments:
  1507          client: *failPointClient
  1508          failPoint:
  1509            configureFailPoint: failCommand
  1510            mode: { times: 1 }
  1511            data:
  1512              failCommands: ["findAndModify"]
  1513              blockConnection: true
  1514              blockTimeMS: 15
  1515      - name: findOneAndDelete
  1516        object: *collection
  1517        arguments:
  1518          timeoutMS: 1000
  1519          filter: {}
  1520
  1521
  1522    expectEvents:
  1523      - client: *client
  1524        events:
  1525          - commandStartedEvent:
  1526              commandName: findAndModify
  1527              databaseName: *databaseName
  1528              command:
  1529                findAndModify: *collectionName
  1530                maxTimeMS: { $$type: ["int", "long"] }
  1531  - description: "timeoutMS can be set to 0 for an operation - findOneAndDelete on collection"
  1532    operations:
  1533      - name: failPoint
  1534        object: testRunner
  1535        arguments:
  1536          client: *failPointClient
  1537          failPoint:
  1538            configureFailPoint: failCommand
  1539            mode: { times: 1 }
  1540            data:
  1541              failCommands: ["findAndModify"]
  1542              blockConnection: true
  1543              blockTimeMS: 15
  1544      - name: findOneAndDelete
  1545        object: *collection
  1546        arguments:
  1547          timeoutMS: 0
  1548          filter: {}
  1549
  1550
  1551    expectEvents:
  1552      - client: *client
  1553        events:
  1554          - commandStartedEvent:
  1555              commandName: findAndModify
  1556              databaseName: *databaseName
  1557              command:
  1558                findAndModify: *collectionName
  1559                maxTimeMS: { $$exists: false }
  1560  - description: "timeoutMS can be configured for an operation - findOneAndReplace on collection"
  1561    operations:
  1562      - name: failPoint
  1563        object: testRunner
  1564        arguments:
  1565          client: *failPointClient
  1566          failPoint:
  1567            configureFailPoint: failCommand
  1568            mode: { times: 1 }
  1569            data:
  1570              failCommands: ["findAndModify"]
  1571              blockConnection: true
  1572              blockTimeMS: 15
  1573      - name: findOneAndReplace
  1574        object: *collection
  1575        arguments:
  1576          timeoutMS: 1000
  1577          filter: {}
  1578          replacement: { x: 1 }
  1579
  1580
  1581    expectEvents:
  1582      - client: *client
  1583        events:
  1584          - commandStartedEvent:
  1585              commandName: findAndModify
  1586              databaseName: *databaseName
  1587              command:
  1588                findAndModify: *collectionName
  1589                maxTimeMS: { $$type: ["int", "long"] }
  1590  - description: "timeoutMS can be set to 0 for an operation - findOneAndReplace on collection"
  1591    operations:
  1592      - name: failPoint
  1593        object: testRunner
  1594        arguments:
  1595          client: *failPointClient
  1596          failPoint:
  1597            configureFailPoint: failCommand
  1598            mode: { times: 1 }
  1599            data:
  1600              failCommands: ["findAndModify"]
  1601              blockConnection: true
  1602              blockTimeMS: 15
  1603      - name: findOneAndReplace
  1604        object: *collection
  1605        arguments:
  1606          timeoutMS: 0
  1607          filter: {}
  1608          replacement: { x: 1 }
  1609
  1610
  1611    expectEvents:
  1612      - client: *client
  1613        events:
  1614          - commandStartedEvent:
  1615              commandName: findAndModify
  1616              databaseName: *databaseName
  1617              command:
  1618                findAndModify: *collectionName
  1619                maxTimeMS: { $$exists: false }
  1620  - description: "timeoutMS can be configured for an operation - findOneAndUpdate on collection"
  1621    operations:
  1622      - name: failPoint
  1623        object: testRunner
  1624        arguments:
  1625          client: *failPointClient
  1626          failPoint:
  1627            configureFailPoint: failCommand
  1628            mode: { times: 1 }
  1629            data:
  1630              failCommands: ["findAndModify"]
  1631              blockConnection: true
  1632              blockTimeMS: 15
  1633      - name: findOneAndUpdate
  1634        object: *collection
  1635        arguments:
  1636          timeoutMS: 1000
  1637          filter: {}
  1638          update: { $set: { x: 1 } }
  1639
  1640
  1641    expectEvents:
  1642      - client: *client
  1643        events:
  1644          - commandStartedEvent:
  1645              commandName: findAndModify
  1646              databaseName: *databaseName
  1647              command:
  1648                findAndModify: *collectionName
  1649                maxTimeMS: { $$type: ["int", "long"] }
  1650  - description: "timeoutMS can be set to 0 for an operation - findOneAndUpdate on collection"
  1651    operations:
  1652      - name: failPoint
  1653        object: testRunner
  1654        arguments:
  1655          client: *failPointClient
  1656          failPoint:
  1657            configureFailPoint: failCommand
  1658            mode: { times: 1 }
  1659            data:
  1660              failCommands: ["findAndModify"]
  1661              blockConnection: true
  1662              blockTimeMS: 15
  1663      - name: findOneAndUpdate
  1664        object: *collection
  1665        arguments:
  1666          timeoutMS: 0
  1667          filter: {}
  1668          update: { $set: { x: 1 } }
  1669
  1670
  1671    expectEvents:
  1672      - client: *client
  1673        events:
  1674          - commandStartedEvent:
  1675              commandName: findAndModify
  1676              databaseName: *databaseName
  1677              command:
  1678                findAndModify: *collectionName
  1679                maxTimeMS: { $$exists: false }
  1680  - description: "timeoutMS can be configured for an operation - bulkWrite on collection"
  1681    operations:
  1682      - name: failPoint
  1683        object: testRunner
  1684        arguments:
  1685          client: *failPointClient
  1686          failPoint:
  1687            configureFailPoint: failCommand
  1688            mode: { times: 1 }
  1689            data:
  1690              failCommands: ["insert"]
  1691              blockConnection: true
  1692              blockTimeMS: 15
  1693      - name: bulkWrite
  1694        object: *collection
  1695        arguments:
  1696          timeoutMS: 1000
  1697          requests:
  1698            - insertOne:
  1699                document: { _id: 1 }
  1700
  1701
  1702    expectEvents:
  1703      - client: *client
  1704        events:
  1705          - commandStartedEvent:
  1706              commandName: insert
  1707              databaseName: *databaseName
  1708              command:
  1709                insert: *collectionName
  1710                maxTimeMS: { $$type: ["int", "long"] }
  1711  - description: "timeoutMS can be set to 0 for an operation - bulkWrite on collection"
  1712    operations:
  1713      - name: failPoint
  1714        object: testRunner
  1715        arguments:
  1716          client: *failPointClient
  1717          failPoint:
  1718            configureFailPoint: failCommand
  1719            mode: { times: 1 }
  1720            data:
  1721              failCommands: ["insert"]
  1722              blockConnection: true
  1723              blockTimeMS: 15
  1724      - name: bulkWrite
  1725        object: *collection
  1726        arguments:
  1727          timeoutMS: 0
  1728          requests:
  1729            - insertOne:
  1730                document: { _id: 1 }
  1731
  1732
  1733    expectEvents:
  1734      - client: *client
  1735        events:
  1736          - commandStartedEvent:
  1737              commandName: insert
  1738              databaseName: *databaseName
  1739              command:
  1740                insert: *collectionName
  1741                maxTimeMS: { $$exists: false }
  1742  - description: "timeoutMS can be configured for an operation - createIndex on collection"
  1743    operations:
  1744      - name: failPoint
  1745        object: testRunner
  1746        arguments:
  1747          client: *failPointClient
  1748          failPoint:
  1749            configureFailPoint: failCommand
  1750            mode: { times: 1 }
  1751            data:
  1752              failCommands: ["createIndexes"]
  1753              blockConnection: true
  1754              blockTimeMS: 15
  1755      - name: createIndex
  1756        object: *collection
  1757        arguments:
  1758          timeoutMS: 1000
  1759          keys: { x: 1 }
  1760          name: "x_1"
  1761
  1762
  1763    expectEvents:
  1764      - client: *client
  1765        events:
  1766          - commandStartedEvent:
  1767              commandName: createIndexes
  1768              databaseName: *databaseName
  1769              command:
  1770                createIndexes: *collectionName
  1771                maxTimeMS: { $$type: ["int", "long"] }
  1772  - description: "timeoutMS can be set to 0 for an operation - createIndex on collection"
  1773    operations:
  1774      - name: failPoint
  1775        object: testRunner
  1776        arguments:
  1777          client: *failPointClient
  1778          failPoint:
  1779            configureFailPoint: failCommand
  1780            mode: { times: 1 }
  1781            data:
  1782              failCommands: ["createIndexes"]
  1783              blockConnection: true
  1784              blockTimeMS: 15
  1785      - name: createIndex
  1786        object: *collection
  1787        arguments:
  1788          timeoutMS: 0
  1789          keys: { x: 1 }
  1790          name: "x_1"
  1791
  1792
  1793    expectEvents:
  1794      - client: *client
  1795        events:
  1796          - commandStartedEvent:
  1797              commandName: createIndexes
  1798              databaseName: *databaseName
  1799              command:
  1800                createIndexes: *collectionName
  1801                maxTimeMS: { $$exists: false }
  1802  - description: "timeoutMS can be configured for an operation - dropIndex on collection"
  1803    operations:
  1804      - name: failPoint
  1805        object: testRunner
  1806        arguments:
  1807          client: *failPointClient
  1808          failPoint:
  1809            configureFailPoint: failCommand
  1810            mode: { times: 1 }
  1811            data:
  1812              failCommands: ["dropIndexes"]
  1813              blockConnection: true
  1814              blockTimeMS: 15
  1815      - name: dropIndex
  1816        object: *collection
  1817        arguments:
  1818          timeoutMS: 1000
  1819          name: "x_1"
  1820
  1821        expectError:
  1822          isTimeoutError: false  # IndexNotFound
  1823    expectEvents:
  1824      - client: *client
  1825        events:
  1826          - commandStartedEvent:
  1827              commandName: dropIndexes
  1828              databaseName: *databaseName
  1829              command:
  1830                dropIndexes: *collectionName
  1831                maxTimeMS: { $$type: ["int", "long"] }
  1832  - description: "timeoutMS can be set to 0 for an operation - dropIndex on collection"
  1833    operations:
  1834      - name: failPoint
  1835        object: testRunner
  1836        arguments:
  1837          client: *failPointClient
  1838          failPoint:
  1839            configureFailPoint: failCommand
  1840            mode: { times: 1 }
  1841            data:
  1842              failCommands: ["dropIndexes"]
  1843              blockConnection: true
  1844              blockTimeMS: 15
  1845      - name: dropIndex
  1846        object: *collection
  1847        arguments:
  1848          timeoutMS: 0
  1849          name: "x_1"
  1850
  1851        expectError:
  1852          isTimeoutError: false  # IndexNotFound
  1853    expectEvents:
  1854      - client: *client
  1855        events:
  1856          - commandStartedEvent:
  1857              commandName: dropIndexes
  1858              databaseName: *databaseName
  1859              command:
  1860                dropIndexes: *collectionName
  1861                maxTimeMS: { $$exists: false }
  1862  - description: "timeoutMS can be configured for an operation - dropIndexes on collection"
  1863    operations:
  1864      - name: failPoint
  1865        object: testRunner
  1866        arguments:
  1867          client: *failPointClient
  1868          failPoint:
  1869            configureFailPoint: failCommand
  1870            mode: { times: 1 }
  1871            data:
  1872              failCommands: ["dropIndexes"]
  1873              blockConnection: true
  1874              blockTimeMS: 15
  1875      - name: dropIndexes
  1876        object: *collection
  1877        arguments:
  1878          timeoutMS: 1000
  1879
  1880
  1881    expectEvents:
  1882      - client: *client
  1883        events:
  1884          - commandStartedEvent:
  1885              commandName: dropIndexes
  1886              databaseName: *databaseName
  1887              command:
  1888                dropIndexes: *collectionName
  1889                maxTimeMS: { $$type: ["int", "long"] }
  1890  - description: "timeoutMS can be set to 0 for an operation - dropIndexes on collection"
  1891    operations:
  1892      - name: failPoint
  1893        object: testRunner
  1894        arguments:
  1895          client: *failPointClient
  1896          failPoint:
  1897            configureFailPoint: failCommand
  1898            mode: { times: 1 }
  1899            data:
  1900              failCommands: ["dropIndexes"]
  1901              blockConnection: true
  1902              blockTimeMS: 15
  1903      - name: dropIndexes
  1904        object: *collection
  1905        arguments:
  1906          timeoutMS: 0
  1907
  1908
  1909    expectEvents:
  1910      - client: *client
  1911        events:
  1912          - commandStartedEvent:
  1913              commandName: dropIndexes
  1914              databaseName: *databaseName
  1915              command:
  1916                dropIndexes: *collectionName
  1917                maxTimeMS: { $$exists: false }

View as plain text