...

Text file src/go.mongodb.org/mongo-driver/testdata/change-streams/change-streams-resume-errorLabels.json

Documentation: go.mongodb.org/mongo-driver/testdata/change-streams

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

View as plain text