| 
 | 1 | +{  | 
 | 2 | +  "runOn": [  | 
 | 3 | +    {  | 
 | 4 | +      "minServerVersion": "4.2",  | 
 | 5 | +      "topology": [  | 
 | 6 | +        "replicaset",  | 
 | 7 | +        "sharded",  | 
 | 8 | +        "load-balanced"  | 
 | 9 | +      ]  | 
 | 10 | +    }  | 
 | 11 | +  ],  | 
 | 12 | +  "database_name": "transaction-tests",  | 
 | 13 | +  "collection_name": "test",  | 
 | 14 | +  "data": [],  | 
 | 15 | +  "tests": [  | 
 | 16 | +    {  | 
 | 17 | +      "description": "add RetryableWriteError and UnknownTransactionCommitResult labels to connection errors",  | 
 | 18 | +      "clientOptions": {  | 
 | 19 | +        "socketTimeoutMS": 100  | 
 | 20 | +      },  | 
 | 21 | +      "failPoint": {  | 
 | 22 | +        "configureFailPoint": "failCommand",  | 
 | 23 | +        "mode": {  | 
 | 24 | +          "times": 2  | 
 | 25 | +        },  | 
 | 26 | +        "data": {  | 
 | 27 | +          "failCommands": [  | 
 | 28 | +            "commitTransaction"  | 
 | 29 | +          ],  | 
 | 30 | +          "blockConnection": true,  | 
 | 31 | +          "blockTimeMS": 150  | 
 | 32 | +        }  | 
 | 33 | +      },  | 
 | 34 | +      "operations": [  | 
 | 35 | +        {  | 
 | 36 | +          "name": "startTransaction",  | 
 | 37 | +          "object": "session0"  | 
 | 38 | +        },  | 
 | 39 | +        {  | 
 | 40 | +          "name": "insertOne",  | 
 | 41 | +          "object": "collection",  | 
 | 42 | +          "arguments": {  | 
 | 43 | +            "session": "session0",  | 
 | 44 | +            "document": {  | 
 | 45 | +              "_id": 1  | 
 | 46 | +            }  | 
 | 47 | +          },  | 
 | 48 | +          "result": {  | 
 | 49 | +            "insertedId": 1  | 
 | 50 | +          }  | 
 | 51 | +        },  | 
 | 52 | +        {  | 
 | 53 | +          "name": "commitTransaction",  | 
 | 54 | +          "object": "session0",  | 
 | 55 | +          "result": {  | 
 | 56 | +            "errorLabelsContain": [  | 
 | 57 | +              "RetryableWriteError",  | 
 | 58 | +              "UnknownTransactionCommitResult"  | 
 | 59 | +            ],  | 
 | 60 | +            "errorLabelsOmit": [  | 
 | 61 | +              "TransientTransactionError"  | 
 | 62 | +            ]  | 
 | 63 | +          }  | 
 | 64 | +        },  | 
 | 65 | +        {  | 
 | 66 | +          "name": "commitTransaction",  | 
 | 67 | +          "object": "session0"  | 
 | 68 | +        }  | 
 | 69 | +      ],  | 
 | 70 | +      "expectations": [  | 
 | 71 | +        {  | 
 | 72 | +          "command_started_event": {  | 
 | 73 | +            "command": {  | 
 | 74 | +              "insert": "test",  | 
 | 75 | +              "documents": [  | 
 | 76 | +                {  | 
 | 77 | +                  "_id": 1  | 
 | 78 | +                }  | 
 | 79 | +              ],  | 
 | 80 | +              "ordered": true,  | 
 | 81 | +              "readConcern": null,  | 
 | 82 | +              "lsid": "session0",  | 
 | 83 | +              "txnNumber": {  | 
 | 84 | +                "$numberLong": "1"  | 
 | 85 | +              },  | 
 | 86 | +              "startTransaction": true,  | 
 | 87 | +              "autocommit": false,  | 
 | 88 | +              "writeConcern": null  | 
 | 89 | +            },  | 
 | 90 | +            "command_name": "insert",  | 
 | 91 | +            "database_name": "transaction-tests"  | 
 | 92 | +          }  | 
 | 93 | +        },  | 
 | 94 | +        {  | 
 | 95 | +          "command_started_event": {  | 
 | 96 | +            "command": {  | 
 | 97 | +              "commitTransaction": 1,  | 
 | 98 | +              "lsid": "session0",  | 
 | 99 | +              "txnNumber": {  | 
 | 100 | +                "$numberLong": "1"  | 
 | 101 | +              },  | 
 | 102 | +              "startTransaction": null,  | 
 | 103 | +              "autocommit": false,  | 
 | 104 | +              "writeConcern": null  | 
 | 105 | +            },  | 
 | 106 | +            "command_name": "commitTransaction",  | 
 | 107 | +            "database_name": "admin"  | 
 | 108 | +          }  | 
 | 109 | +        },  | 
 | 110 | +        {  | 
 | 111 | +          "command_started_event": {  | 
 | 112 | +            "command": {  | 
 | 113 | +              "commitTransaction": 1,  | 
 | 114 | +              "lsid": "session0",  | 
 | 115 | +              "txnNumber": {  | 
 | 116 | +                "$numberLong": "1"  | 
 | 117 | +              },  | 
 | 118 | +              "startTransaction": null,  | 
 | 119 | +              "autocommit": false,  | 
 | 120 | +              "writeConcern": {  | 
 | 121 | +                "w": "majority",  | 
 | 122 | +                "wtimeout": 10000  | 
 | 123 | +              }  | 
 | 124 | +            },  | 
 | 125 | +            "command_name": "commitTransaction",  | 
 | 126 | +            "database_name": "admin"  | 
 | 127 | +          }  | 
 | 128 | +        },  | 
 | 129 | +        {  | 
 | 130 | +          "command_started_event": {  | 
 | 131 | +            "command": {  | 
 | 132 | +              "commitTransaction": 1,  | 
 | 133 | +              "lsid": "session0",  | 
 | 134 | +              "txnNumber": {  | 
 | 135 | +                "$numberLong": "1"  | 
 | 136 | +              },  | 
 | 137 | +              "startTransaction": null,  | 
 | 138 | +              "autocommit": false,  | 
 | 139 | +              "writeConcern": {  | 
 | 140 | +                "w": "majority",  | 
 | 141 | +                "wtimeout": 10000  | 
 | 142 | +              }  | 
 | 143 | +            },  | 
 | 144 | +            "command_name": "commitTransaction",  | 
 | 145 | +            "database_name": "admin"  | 
 | 146 | +          }  | 
 | 147 | +        }  | 
 | 148 | +      ],  | 
 | 149 | +      "outcome": {  | 
 | 150 | +        "collection": {  | 
 | 151 | +          "data": [  | 
 | 152 | +            {  | 
 | 153 | +              "_id": 1  | 
 | 154 | +            }  | 
 | 155 | +          ]  | 
 | 156 | +        }  | 
 | 157 | +      }  | 
 | 158 | +    }  | 
 | 159 | +  ]  | 
 | 160 | +}  | 
0 commit comments