From 66e01fd4b524d59a39ef38c51d9fd8b352c96dee Mon Sep 17 00:00:00 2001 From: Divjot Arora Date: Thu, 29 Apr 2021 14:23:35 -0400 Subject: [PATCH] GODRIVER-1981 Sync new transactions tests (#652) --- data/transactions/unified/mongos-unpin.json | 49 +++++++++++++++++++++ data/transactions/unified/mongos-unpin.yml | 17 +++++++ 2 files changed, 66 insertions(+) diff --git a/data/transactions/unified/mongos-unpin.json b/data/transactions/unified/mongos-unpin.json index 2e17c5d254..33127198a8 100644 --- a/data/transactions/unified/mongos-unpin.json +++ b/data/transactions/unified/mongos-unpin.json @@ -185,6 +185,55 @@ } ] }, + { + "description": "unpin after non-transient error on abort", + "operations": [ + { + "name": "startTransaction", + "object": "session0" + }, + { + "name": "insertOne", + "object": "collection0", + "arguments": { + "document": { + "x": 1 + }, + "session": "session0" + } + }, + { + "name": "targetedFailPoint", + "object": "testRunner", + "arguments": { + "session": "session0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "times": 1 + }, + "data": { + "failCommands": [ + "abortTransaction" + ], + "errorCode": 91 + } + } + } + }, + { + "name": "abortTransaction", + "object": "session0" + }, + { + "name": "assertSessionUnpinned", + "object": "testRunner", + "arguments": { + "session": "session0" + } + } + ] + }, { "description": "unpin when a new transaction is started", "operations": [ diff --git a/data/transactions/unified/mongos-unpin.yml b/data/transactions/unified/mongos-unpin.yml index e43071ddf8..a5d1ecdecc 100644 --- a/data/transactions/unified/mongos-unpin.yml +++ b/data/transactions/unified/mongos-unpin.yml @@ -93,6 +93,23 @@ tests: - *abortTransaction - *assertNoPinnedServer + - description: unpin after non-transient error on abort + operations: + - *startTransaction + - *insertOne + - name: targetedFailPoint + object: testRunner + arguments: + session: *session0 + failPoint: + configureFailPoint: failCommand + mode: { times: 1 } + data: + failCommands: [ abortTransaction ] + errorCode: 91 # ShutdownInProgress + - *abortTransaction + - *assertNoPinnedServer + - description: unpin when a new transaction is started operations: - *startTransaction