Skip to content

Commit ac9e097

Browse files
committed
run updated transactions tests
1 parent 3ac26b7 commit ac9e097

3 files changed

Lines changed: 99 additions & 6 deletions

File tree

test/integration/transactions/transactions.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const SKIPPED_TESTS = [
1313
'client bulkWrite with writeConcern in a transaction causes a transaction error'
1414
];
1515

16-
describe('Transactions Spec Unified Tests', function () {
16+
describe.only('Transactions Spec Unified Tests', function () {
1717
runUnifiedSuite(loadSpecTests(path.join('transactions', 'unified')), test => {
1818
return SKIPPED_TESTS.includes(test.description)
1919
? 'TODO(NODE-5924): Skipping failing transaction tests'

test/spec/transactions/unified/backpressure-retryable-writes.json

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,24 +413,80 @@
413413
{
414414
"commandStartedEvent": {
415415
"command": {
416+
"insert": "test",
417+
"documents": [
418+
{
419+
"_id": 2
420+
}
421+
],
422+
"ordered": true,
423+
"lsid": {
424+
"$$sessionLsid": "session0"
425+
},
426+
"txnNumber": {
427+
"$numberLong": "1"
428+
},
416429
"startTransaction": true,
417-
"autocommit": false
430+
"autocommit": false,
431+
"readConcern": {
432+
"$$exists": false
433+
},
434+
"writeConcern": {
435+
"$$exists": false
436+
}
418437
},
419-
"commandName": "insert"
438+
"commandName": "insert",
439+
"databaseName": "transaction-tests"
420440
}
421441
},
422442
{
423443
"commandStartedEvent": {
424444
"command": {
445+
"insert": "test",
446+
"documents": [
447+
{
448+
"_id": 2
449+
}
450+
],
451+
"ordered": true,
452+
"lsid": {
453+
"$$sessionLsid": "session0"
454+
},
455+
"txnNumber": {
456+
"$numberLong": "1"
457+
},
425458
"startTransaction": true,
426-
"autocommit": false
459+
"autocommit": false,
460+
"readConcern": {
461+
"$$exists": false
462+
},
463+
"writeConcern": {
464+
"$$exists": false
465+
}
427466
},
428-
"commandName": "insert"
467+
"commandName": "insert",
468+
"databaseName": "transaction-tests"
429469
}
430470
},
431471
{
432472
"commandStartedEvent": {
433-
"commandName": "abortTransaction"
473+
"command": {
474+
"lsid": {
475+
"$$sessionLsid": "session0"
476+
},
477+
"txnNumber": {
478+
"$numberLong": "1"
479+
},
480+
"startTransaction": {
481+
"$$exists": false
482+
},
483+
"autocommit": false,
484+
"writeConcern": {
485+
"$$exists": false
486+
}
487+
},
488+
"commandName": "abortTransaction",
489+
"databaseName": "admin"
434490
}
435491
}
436492
]

test/spec/transactions/unified/backpressure-retryable-writes.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,53 @@ tests:
240240
events:
241241
- commandStartedEvent:
242242
command:
243+
insert: test
244+
documents:
245+
- _id: 2
246+
ordered: true
247+
lsid:
248+
$$sessionLsid: *session0
249+
txnNumber:
250+
$numberLong: "1"
243251
startTransaction: true
244252
autocommit: false
253+
readConcern:
254+
$$exists: false
255+
writeConcern:
256+
$$exists: false
245257
commandName: insert
258+
databaseName: *database_name
246259
- commandStartedEvent:
247260
command:
261+
insert: test
262+
documents:
263+
- _id: 2
264+
ordered: true
265+
lsid:
266+
$$sessionLsid: *session0
267+
txnNumber:
268+
$numberLong: "1"
248269
startTransaction: true
249270
autocommit: false
271+
readConcern:
272+
$$exists: false
273+
writeConcern:
274+
$$exists: false
250275
commandName: insert
276+
databaseName: *database_name
251277
- commandStartedEvent:
278+
command:
279+
lsid:
280+
$$sessionLsid: *session0
281+
txnNumber:
282+
$numberLong: "1"
283+
startTransaction:
284+
$$exists: false
285+
autocommit: false
286+
writeConcern:
287+
$$exists: false
252288
commandName: abortTransaction
289+
databaseName: admin
253290
outcome:
254291
- collectionName: *collection_name
255292
databaseName: *database_name

0 commit comments

Comments
 (0)