Skip to content

Commit 66e01fd

Browse files
author
Divjot Arora
authored
GODRIVER-1981 Sync new transactions tests (#652)
1 parent b1d1e30 commit 66e01fd

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

data/transactions/unified/mongos-unpin.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,55 @@
185185
}
186186
]
187187
},
188+
{
189+
"description": "unpin after non-transient error on abort",
190+
"operations": [
191+
{
192+
"name": "startTransaction",
193+
"object": "session0"
194+
},
195+
{
196+
"name": "insertOne",
197+
"object": "collection0",
198+
"arguments": {
199+
"document": {
200+
"x": 1
201+
},
202+
"session": "session0"
203+
}
204+
},
205+
{
206+
"name": "targetedFailPoint",
207+
"object": "testRunner",
208+
"arguments": {
209+
"session": "session0",
210+
"failPoint": {
211+
"configureFailPoint": "failCommand",
212+
"mode": {
213+
"times": 1
214+
},
215+
"data": {
216+
"failCommands": [
217+
"abortTransaction"
218+
],
219+
"errorCode": 91
220+
}
221+
}
222+
}
223+
},
224+
{
225+
"name": "abortTransaction",
226+
"object": "session0"
227+
},
228+
{
229+
"name": "assertSessionUnpinned",
230+
"object": "testRunner",
231+
"arguments": {
232+
"session": "session0"
233+
}
234+
}
235+
]
236+
},
188237
{
189238
"description": "unpin when a new transaction is started",
190239
"operations": [

data/transactions/unified/mongos-unpin.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ tests:
9393
- *abortTransaction
9494
- *assertNoPinnedServer
9595

96+
- description: unpin after non-transient error on abort
97+
operations:
98+
- *startTransaction
99+
- *insertOne
100+
- name: targetedFailPoint
101+
object: testRunner
102+
arguments:
103+
session: *session0
104+
failPoint:
105+
configureFailPoint: failCommand
106+
mode: { times: 1 }
107+
data:
108+
failCommands: [ abortTransaction ]
109+
errorCode: 91 # ShutdownInProgress
110+
- *abortTransaction
111+
- *assertNoPinnedServer
112+
96113
- description: unpin when a new transaction is started
97114
operations:
98115
- *startTransaction

0 commit comments

Comments
 (0)