...

Text file src/go.mongodb.org/mongo-driver/testdata/retryable-writes/legacy/insertMany.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  "tests": [
    17    {
    18      "description": "InsertMany succeeds after one network error",
    19      "failPoint": {
    20        "configureFailPoint": "onPrimaryTransactionalWrite",
    21        "mode": {
    22          "times": 1
    23        }
    24      },
    25      "operation": {
    26        "name": "insertMany",
    27        "arguments": {
    28          "documents": [
    29            {
    30              "_id": 2,
    31              "x": 22
    32            },
    33            {
    34              "_id": 3,
    35              "x": 33
    36            }
    37          ],
    38          "options": {
    39            "ordered": true
    40          }
    41        }
    42      },
    43      "outcome": {
    44        "result": {
    45          "insertedIds": {
    46            "0": 2,
    47            "1": 3
    48          }
    49        },
    50        "collection": {
    51          "data": [
    52            {
    53              "_id": 1,
    54              "x": 11
    55            },
    56            {
    57              "_id": 2,
    58              "x": 22
    59            },
    60            {
    61              "_id": 3,
    62              "x": 33
    63            }
    64          ]
    65        }
    66      }
    67    },
    68    {
    69      "description": "InsertMany with unordered execution",
    70      "failPoint": {
    71        "configureFailPoint": "onPrimaryTransactionalWrite",
    72        "mode": {
    73          "times": 1
    74        }
    75      },
    76      "operation": {
    77        "name": "insertMany",
    78        "arguments": {
    79          "documents": [
    80            {
    81              "_id": 2,
    82              "x": 22
    83            },
    84            {
    85              "_id": 3,
    86              "x": 33
    87            }
    88          ],
    89          "options": {
    90            "ordered": false
    91          }
    92        }
    93      },
    94      "outcome": {
    95        "result": {
    96          "insertedIds": {
    97            "0": 2,
    98            "1": 3
    99          }
   100        },
   101        "collection": {
   102          "data": [
   103            {
   104              "_id": 1,
   105              "x": 11
   106            },
   107            {
   108              "_id": 2,
   109              "x": 22
   110            },
   111            {
   112              "_id": 3,
   113              "x": 33
   114            }
   115          ]
   116        }
   117      }
   118    },
   119    {
   120      "description": "InsertMany fails after multiple network errors",
   121      "failPoint": {
   122        "configureFailPoint": "onPrimaryTransactionalWrite",
   123        "mode": "alwaysOn",
   124        "data": {
   125          "failBeforeCommitExceptionCode": 1
   126        }
   127      },
   128      "operation": {
   129        "name": "insertMany",
   130        "arguments": {
   131          "documents": [
   132            {
   133              "_id": 2,
   134              "x": 22
   135            },
   136            {
   137              "_id": 3,
   138              "x": 33
   139            },
   140            {
   141              "_id": 4,
   142              "x": 44
   143            }
   144          ],
   145          "options": {
   146            "ordered": true
   147          }
   148        }
   149      },
   150      "outcome": {
   151        "error": true,
   152        "collection": {
   153          "data": [
   154            {
   155              "_id": 1,
   156              "x": 11
   157            }
   158          ]
   159        }
   160      }
   161    }
   162  ]
   163}

View as plain text