{ "description": "errors-client", "schemaVersion": "1.3", "runOnRequirements": [ { "minServerVersion": "4.0", "topologies": [ "replicaset" ] }, { "minServerVersion": "4.1.8", "topologies": [ "sharded", "load-balanced" ] } ], "createEntities": [ { "client": { "id": "client0", "useMultipleMongoses": false, "observeEvents": [ "commandStartedEvent" ] } }, { "database": { "id": "database0", "client": "client0", "databaseName": "transaction-tests" } }, { "collection": { "id": "collection0", "database": "database0", "collectionName": "test" } }, { "session": { "id": "session0", "client": "client0" } } ], "initialData": [ { "collectionName": "test", "databaseName": "transaction-tests", "documents": [] } ], "tests": [ { "description": "Client side error in command starting transaction", "operations": [ { "object": "session0", "name": "startTransaction" }, { "object": "collection0", "name": "updateOne", "arguments": { "session": "session0", "filter": { "_id": 1 }, "update": { "x": 1 } }, "expectError": { "isError": true } }, { "object": "testRunner", "name": "assertSessionTransactionState", "arguments": { "session": "session0", "state": "starting" } } ] }, { "description": "Client side error when transaction is in progress", "operations": [ { "object": "session0", "name": "startTransaction" }, { "object": "collection0", "name": "insertOne", "arguments": { "session": "session0", "document": { "_id": 1 } }, "expectResult": { "$$unsetOrMatches": { "insertedId": { "$$unsetOrMatches": 1 } } } }, { "object": "collection0", "name": "updateOne", "arguments": { "session": "session0", "filter": { "_id": 1 }, "update": { "x": 1 } }, "expectError": { "isError": true } }, { "object": "testRunner", "name": "assertSessionTransactionState", "arguments": { "session": "session0", "state": "in_progress" } } ] } ] }