...

Text file src/go.mongodb.org/mongo-driver/testdata/retryable-reads/aggregate-merge.json

Documentation: go.mongodb.org/mongo-driver/testdata/retryable-reads

     1{
     2  "runOn": [
     3    {
     4      "minServerVersion": "4.1.11"
     5    }
     6  ],
     7  "database_name": "retryable-reads-tests",
     8  "collection_name": "coll",
     9  "data": [
    10    {
    11      "_id": 1,
    12      "x": 11
    13    },
    14    {
    15      "_id": 2,
    16      "x": 22
    17    },
    18    {
    19      "_id": 3,
    20      "x": 33
    21    }
    22  ],
    23  "tests": [
    24    {
    25      "description": "Aggregate with $merge does not retry",
    26      "failPoint": {
    27        "configureFailPoint": "failCommand",
    28        "mode": {
    29          "times": 1
    30        },
    31        "data": {
    32          "failCommands": [
    33            "aggregate"
    34          ],
    35          "closeConnection": true
    36        }
    37      },
    38      "operations": [
    39        {
    40          "object": "collection",
    41          "name": "aggregate",
    42          "arguments": {
    43            "pipeline": [
    44              {
    45                "$match": {
    46                  "_id": {
    47                    "$gt": 1
    48                  }
    49                }
    50              },
    51              {
    52                "$sort": {
    53                  "x": 1
    54                }
    55              },
    56              {
    57                "$merge": {
    58                  "into": "output-collection"
    59                }
    60              }
    61            ]
    62          },
    63          "error": true
    64        }
    65      ],
    66      "expectations": [
    67        {
    68          "command_started_event": {
    69            "command": {
    70              "aggregate": "coll",
    71              "pipeline": [
    72                {
    73                  "$match": {
    74                    "_id": {
    75                      "$gt": 1
    76                    }
    77                  }
    78                },
    79                {
    80                  "$sort": {
    81                    "x": 1
    82                  }
    83                },
    84                {
    85                  "$merge": {
    86                    "into": "output-collection"
    87                  }
    88                }
    89              ]
    90            },
    91            "command_name": "aggregate",
    92            "database_name": "retryable-reads-tests"
    93          }
    94        }
    95      ]
    96    }
    97  ]
    98}

View as plain text