...

Text file src/go.mongodb.org/mongo-driver/testdata/retryable-writes/legacy/insertOne-errorLabels.json

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

     1{
     2  "runOn": [
     3    {
     4      "minServerVersion": "4.3.1",
     5      "topology": [
     6        "replicaset",
     7        "sharded",
     8        "load-balanced"
     9      ]
    10    }
    11  ],
    12  "data": [],
    13  "tests": [
    14    {
    15      "description": "InsertOne succeeds with RetryableWriteError from server",
    16      "failPoint": {
    17        "configureFailPoint": "failCommand",
    18        "mode": {
    19          "times": 1
    20        },
    21        "data": {
    22          "failCommands": [
    23            "insert"
    24          ],
    25          "errorCode": 112,
    26          "errorLabels": [
    27            "RetryableWriteError"
    28          ]
    29        }
    30      },
    31      "operation": {
    32        "name": "insertOne",
    33        "arguments": {
    34          "document": {
    35            "_id": 1,
    36            "x": 11
    37          }
    38        }
    39      },
    40      "outcome": {
    41        "result": {
    42          "insertedId": 1
    43        },
    44        "collection": {
    45          "data": [
    46            {
    47              "_id": 1,
    48              "x": 11
    49            }
    50          ]
    51        }
    52      }
    53    },
    54    {
    55      "description": "InsertOne fails if server does not return RetryableWriteError",
    56      "failPoint": {
    57        "configureFailPoint": "failCommand",
    58        "mode": {
    59          "times": 1
    60        },
    61        "data": {
    62          "failCommands": [
    63            "insert"
    64          ],
    65          "errorCode": 11600,
    66          "errorLabels": []
    67        }
    68      },
    69      "operation": {
    70        "name": "insertOne",
    71        "arguments": {
    72          "document": {
    73            "_id": 1,
    74            "x": 11
    75          }
    76        }
    77      },
    78      "outcome": {
    79        "error": true,
    80        "result": {
    81          "errorLabelsOmit": [
    82            "RetryableWriteError"
    83          ]
    84        },
    85        "collection": {
    86          "data": []
    87        }
    88      }
    89    }
    90  ]
    91}

View as plain text