...

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

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

     1{
     2  "runOn": [
     3    {
     4      "minServerVersion": "3.6",
     5      "topology": [
     6        "replicaset"
     7      ]
     8    }
     9  ],
    10  "data": [
    11    {
    12      "_id": 1,
    13      "x": 11
    14    },
    15    {
    16      "_id": 2,
    17      "x": 22
    18    }
    19  ],
    20  "tests": [
    21    {
    22      "description": "DeleteOne is committed on first attempt",
    23      "failPoint": {
    24        "configureFailPoint": "onPrimaryTransactionalWrite",
    25        "mode": {
    26          "times": 1
    27        }
    28      },
    29      "operation": {
    30        "name": "deleteOne",
    31        "arguments": {
    32          "filter": {
    33            "_id": 1
    34          }
    35        }
    36      },
    37      "outcome": {
    38        "result": {
    39          "deletedCount": 1
    40        },
    41        "collection": {
    42          "data": [
    43            {
    44              "_id": 2,
    45              "x": 22
    46            }
    47          ]
    48        }
    49      }
    50    },
    51    {
    52      "description": "DeleteOne is not committed on first attempt",
    53      "failPoint": {
    54        "configureFailPoint": "onPrimaryTransactionalWrite",
    55        "mode": {
    56          "times": 1
    57        },
    58        "data": {
    59          "failBeforeCommitExceptionCode": 1
    60        }
    61      },
    62      "operation": {
    63        "name": "deleteOne",
    64        "arguments": {
    65          "filter": {
    66            "_id": 1
    67          }
    68        }
    69      },
    70      "outcome": {
    71        "result": {
    72          "deletedCount": 1
    73        },
    74        "collection": {
    75          "data": [
    76            {
    77              "_id": 2,
    78              "x": 22
    79            }
    80          ]
    81        }
    82      }
    83    },
    84    {
    85      "description": "DeleteOne is never committed",
    86      "failPoint": {
    87        "configureFailPoint": "onPrimaryTransactionalWrite",
    88        "mode": {
    89          "times": 2
    90        },
    91        "data": {
    92          "failBeforeCommitExceptionCode": 1
    93        }
    94      },
    95      "operation": {
    96        "name": "deleteOne",
    97        "arguments": {
    98          "filter": {
    99            "_id": 1
   100          }
   101        }
   102      },
   103      "outcome": {
   104        "error": true,
   105        "collection": {
   106          "data": [
   107            {
   108              "_id": 1,
   109              "x": 11
   110            },
   111            {
   112              "_id": 2,
   113              "x": 22
   114            }
   115          ]
   116        }
   117      }
   118    }
   119  ]
   120}

View as plain text