Skip to content

Commit

Permalink
GODRIVER-1981 Sync new transactions tests (mongodb#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
Divjot Arora authored and Mohammad Fahim Abrar committed Mar 17, 2022
1 parent 94b628a commit 857c530
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
49 changes: 49 additions & 0 deletions data/transactions/unified/mongos-unpin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
17 changes: 17 additions & 0 deletions data/transactions/unified/mongos-unpin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 857c530

Please sign in to comment.