From 8ade15e2d9a1a648f6a00885ace81194ceae9812 Mon Sep 17 00:00:00 2001 From: Sergey Zelenov Date: Thu, 5 Mar 2026 15:55:50 +0100 Subject: [PATCH] test(NODE-7463): sync spec tests for transactions --- .../backpressure-retryable-writes.json | 22 +++++++++++++++---- .../unified/backpressure-retryable-writes.yml | 14 ++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/test/spec/transactions/unified/backpressure-retryable-writes.json b/test/spec/transactions/unified/backpressure-retryable-writes.json index 0817e03f2f..0b07f80c58 100644 --- a/test/spec/transactions/unified/backpressure-retryable-writes.json +++ b/test/spec/transactions/unified/backpressure-retryable-writes.json @@ -412,17 +412,31 @@ "events": [ { "commandStartedEvent": { - "commandName": "insert" + "command": { + "startTransaction": true + }, + "commandName": "insert", + "databaseName": "transaction-tests" } }, { "commandStartedEvent": { - "commandName": "insert" + "command": { + "startTransaction": true + }, + "commandName": "insert", + "databaseName": "transaction-tests" } }, { "commandStartedEvent": { - "commandName": "abortTransaction" + "command": { + "startTransaction": { + "$$exists": false + } + }, + "commandName": "abortTransaction", + "databaseName": "admin" } } ] @@ -437,4 +451,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/test/spec/transactions/unified/backpressure-retryable-writes.yml b/test/spec/transactions/unified/backpressure-retryable-writes.yml index 630c9d9694..157dc096c9 100644 --- a/test/spec/transactions/unified/backpressure-retryable-writes.yml +++ b/test/spec/transactions/unified/backpressure-retryable-writes.yml @@ -144,7 +144,7 @@ tests: outcome: - collectionName: *collection_name databaseName: *database_name - documents: + documents: - { _id: 1 } - { _id: 2 } - description: writes are retried maxAttempts=5 times if backpressure labels are added @@ -239,12 +239,22 @@ tests: - client: *client0 events: - commandStartedEvent: + command: + startTransaction: true commandName: insert + databaseName: *database_name - commandStartedEvent: + command: + startTransaction: true commandName: insert + databaseName: *database_name - commandStartedEvent: + command: + startTransaction: + $$exists: false commandName: abortTransaction + databaseName: admin outcome: - collectionName: *collection_name databaseName: *database_name - documents: [] + documents: [] \ No newline at end of file