From bddc66af9bd8bcb1c680ad5a66f61e30df5f9a95 Mon Sep 17 00:00:00 2001 From: Cloud User Date: Mon, 30 Mar 2026 16:03:12 +0000 Subject: [PATCH 1/4] resyncing specs 03-30-2026 --- .../spec/unified/accessToken-azure.json | 186 +++++++ .../spec/unified/accessToken-gcp.json | 188 ++++++++ .../unified/backpressure-retryable-abort.json | 357 ++++++++++++++ .../backpressure-retryable-commit.json | 374 +++++++++++++++ .../unified/backpressure-retryable-reads.json | 328 +++++++++++++ .../backpressure-retryable-writes.json | 454 ++++++++++++++++++ ...s-kmsProviders-azure-accessToken-type.json | 31 ++ ...pts-kmsProviders-gcp-accessToken-type.json | 31 ++ .../client-backpressure-options.json | 35 ++ 9 files changed, 1984 insertions(+) create mode 100644 test/client-side-encryption/spec/unified/accessToken-azure.json create mode 100644 test/client-side-encryption/spec/unified/accessToken-gcp.json create mode 100644 test/transactions/unified/backpressure-retryable-abort.json create mode 100644 test/transactions/unified/backpressure-retryable-commit.json create mode 100644 test/transactions/unified/backpressure-retryable-reads.json create mode 100644 test/transactions/unified/backpressure-retryable-writes.json create mode 100644 test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json create mode 100644 test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json create mode 100644 test/uri_options/client-backpressure-options.json diff --git a/test/client-side-encryption/spec/unified/accessToken-azure.json b/test/client-side-encryption/spec/unified/accessToken-azure.json new file mode 100644 index 0000000000..510d87956f --- /dev/null +++ b/test/client-side-encryption/spec/unified/accessToken-azure.json @@ -0,0 +1,186 @@ +{ + "description": "accessToken-azure", + "schemaVersion": "1.28", + "runOnRequirements": [ + { + "minServerVersion": "4.1.10", + "csfle": { + "minLibmongocryptVersion": "1.6.0" + } + } + ], + "createEntities": [ + { + "client": { + "id": "client", + "autoEncryptOpts": { + "keyVaultNamespace": "keyvault.datakeys", + "kmsProviders": { + "azure": { + "accessToken": { + "$$placeholder": 1 + } + } + } + } + } + }, + { + "database": { + "id": "db", + "client": "client", + "databaseName": "db" + } + }, + { + "collection": { + "id": "coll", + "database": "db", + "collectionName": "coll" + } + }, + { + "clientEncryption": { + "id": "clientEncryption", + "clientEncryptionOpts": { + "keyVaultClient": "client", + "keyVaultNamespace": "keyvault.datakeys", + "kmsProviders": { + "azure": { + "accessToken": { + "$$placeholder": 1 + } + } + } + } + } + } + ], + "initialData": [ + { + "databaseName": "db", + "collectionName": "coll", + "documents": [], + "createOptions": { + "validator": { + "$jsonSchema": { + "properties": { + "secret": { + "encrypt": { + "keyId": [ + { + "$binary": { + "base64": "AZURE+AAAAAAAAAAAAAAAA==", + "subType": "04" + } + } + ], + "bsonType": "string", + "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" + } + } + }, + "bsonType": "object" + } + } + } + }, + { + "databaseName": "keyvault", + "collectionName": "datakeys", + "documents": [ + { + "_id": { + "$binary": { + "base64": "AZURE+AAAAAAAAAAAAAAAA==", + "subType": "04" + } + }, + "keyAltNames": [ + "my-key" + ], + "keyMaterial": { + "$binary": { + "base64": "n+HWZ0ZSVOYA3cvQgP7inN4JSXfOH85IngmeQxRpQHjCCcqT3IFqEWNlrsVHiz3AELimHhX4HKqOLWMUeSIT6emUDDoQX9BAv8DR1+E1w4nGs/NyEneac78EYFkK3JysrFDOgl2ypCCTKAypkn9CkAx1if4cfgQE93LW4kczcyHdGiH36CIxrCDGv1UzAvERN5Qa47DVwsM6a+hWsF2AAAJVnF0wYLLJU07TuRHdMrrphPWXZsFgyV+lRqJ7DDpReKNO8nMPLV/mHqHBHGPGQiRdb9NoJo8CvokGz4+KE8oLwzKf6V24dtwZmRkrsDV4iOhvROAzz+Euo1ypSkL3mw==", + "subType": "00" + } + }, + "creationDate": { + "$date": { + "$numberLong": "1552949630483" + } + }, + "updateDate": { + "$date": { + "$numberLong": "1552949630483" + } + }, + "status": { + "$numberInt": "0" + }, + "masterKey": { + "provider": "azure", + "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", + "keyName": "key-name-csfle" + } + } + ] + } + ], + "tests": [ + { + "description": "Auto encrypt using access token Azure credentials", + "operations": [ + { + "name": "insertOne", + "arguments": { + "document": { + "_id": 1, + "secret": "string0" + } + }, + "object": "coll" + } + ], + "outcome": [ + { + "documents": [ + { + "_id": 1, + "secret": { + "$binary": { + "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", + "subType": "06" + } + } + } + ], + "collectionName": "coll", + "databaseName": "db" + } + ] + }, + { + "description": "Explicit encrypt using access token Azure credentials", + "operations": [ + { + "name": "encrypt", + "object": "clientEncryption", + "arguments": { + "value": "string0", + "opts": { + "keyAltName": "my-key", + "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" + } + }, + "expectResult": { + "$binary": { + "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", + "subType": "06" + } + } + } + ] + } + ] +} diff --git a/test/client-side-encryption/spec/unified/accessToken-gcp.json b/test/client-side-encryption/spec/unified/accessToken-gcp.json new file mode 100644 index 0000000000..f5cf8914f2 --- /dev/null +++ b/test/client-side-encryption/spec/unified/accessToken-gcp.json @@ -0,0 +1,188 @@ +{ + "description": "accessToken-gcp", + "schemaVersion": "1.28", + "runOnRequirements": [ + { + "minServerVersion": "4.1.10", + "csfle": { + "minLibmongocryptVersion": "1.6.0" + } + } + ], + "createEntities": [ + { + "client": { + "id": "client", + "autoEncryptOpts": { + "keyVaultNamespace": "keyvault.datakeys", + "kmsProviders": { + "gcp": { + "accessToken": { + "$$placeholder": 1 + } + } + } + } + } + }, + { + "database": { + "id": "db", + "client": "client", + "databaseName": "db" + } + }, + { + "collection": { + "id": "coll", + "database": "db", + "collectionName": "coll" + } + }, + { + "clientEncryption": { + "id": "clientEncryption", + "clientEncryptionOpts": { + "keyVaultClient": "client", + "keyVaultNamespace": "keyvault.datakeys", + "kmsProviders": { + "gcp": { + "accessToken": { + "$$placeholder": 1 + } + } + } + } + } + } + ], + "initialData": [ + { + "databaseName": "db", + "collectionName": "coll", + "documents": [], + "createOptions": { + "validator": { + "$jsonSchema": { + "properties": { + "secret": { + "encrypt": { + "keyId": [ + { + "$binary": { + "base64": "GCP+AAAAAAAAAAAAAAAAAA==", + "subType": "04" + } + } + ], + "bsonType": "string", + "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" + } + } + }, + "bsonType": "object" + } + } + } + }, + { + "databaseName": "keyvault", + "collectionName": "datakeys", + "documents": [ + { + "_id": { + "$binary": { + "base64": "GCP+AAAAAAAAAAAAAAAAAA==", + "subType": "04" + } + }, + "keyAltNames": [ + "my-key" + ], + "keyMaterial": { + "$binary": { + "base64": "CiQAIgLj0WyktnB4dfYHo5SLZ41K4ASQrjJUaSzl5vvVH0G12G0SiQEAjlV8XPlbnHDEDFbdTO4QIe8ER2/172U1ouLazG0ysDtFFIlSvWX5ZnZUrRMmp/R2aJkzLXEt/zf8Mn4Lfm+itnjgo5R9K4pmPNvvPKNZX5C16lrPT+aA+rd+zXFSmlMg3i5jnxvTdLHhg3G7Q/Uv1ZIJskKt95bzLoe0tUVzRWMYXLIEcohnQg==", + "subType": "00" + } + }, + "creationDate": { + "$date": { + "$numberLong": "1552949630483" + } + }, + "updateDate": { + "$date": { + "$numberLong": "1552949630483" + } + }, + "status": { + "$numberInt": "0" + }, + "masterKey": { + "provider": "gcp", + "projectId": "devprod-drivers", + "location": "global", + "keyRing": "key-ring-csfle", + "keyName": "key-name-csfle" + } + } + ] + } + ], + "tests": [ + { + "description": "Auto encrypt using access token GCP credentials", + "operations": [ + { + "name": "insertOne", + "arguments": { + "document": { + "_id": 1, + "secret": "string0" + } + }, + "object": "coll" + } + ], + "outcome": [ + { + "documents": [ + { + "_id": 1, + "secret": { + "$binary": { + "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", + "subType": "06" + } + } + } + ], + "collectionName": "coll", + "databaseName": "db" + } + ] + }, + { + "description": "Explicit encrypt using access token GCP credentials", + "operations": [ + { + "name": "encrypt", + "object": "clientEncryption", + "arguments": { + "value": "string0", + "opts": { + "keyAltName": "my-key", + "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" + } + }, + "expectResult": { + "$binary": { + "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", + "subType": "06" + } + } + } + ] + } + ] +} diff --git a/test/transactions/unified/backpressure-retryable-abort.json b/test/transactions/unified/backpressure-retryable-abort.json new file mode 100644 index 0000000000..53fc9c6f09 --- /dev/null +++ b/test/transactions/unified/backpressure-retryable-abort.json @@ -0,0 +1,357 @@ +{ + "description": "backpressure-retryable-abort", + "schemaVersion": "1.3", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "topologies": [ + "replicaset", + "sharded", + "load-balanced" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "client0", + "useMultipleMongoses": false, + "observeEvents": [ + "commandStartedEvent" + ] + } + }, + { + "database": { + "id": "database0", + "client": "client0", + "databaseName": "transaction-tests" + } + }, + { + "collection": { + "id": "collection0", + "database": "database0", + "collectionName": "test" + } + }, + { + "session": { + "id": "session0", + "client": "client0" + } + } + ], + "initialData": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ], + "tests": [ + { + "description": "abortTransaction retries if backpressure labels are added", + "operations": [ + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "times": 2 + }, + "data": { + "failCommands": [ + "abortTransaction" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "session0", + "name": "abortTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": true, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "abortTransaction", + "databaseName": "admin" + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "abortTransaction", + "databaseName": "admin" + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "abortTransaction", + "databaseName": "admin" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ] + }, + { + "description": "abortTransaction is retried maxAttempts=5 times if backpressure labels are added", + "operations": [ + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": "alwaysOn", + "data": { + "failCommands": [ + "abortTransaction" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "session0", + "name": "abortTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": true, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "abortTransaction", + "databaseName": "admin" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ] + } + ] +} diff --git a/test/transactions/unified/backpressure-retryable-commit.json b/test/transactions/unified/backpressure-retryable-commit.json new file mode 100644 index 0000000000..ae873561a9 --- /dev/null +++ b/test/transactions/unified/backpressure-retryable-commit.json @@ -0,0 +1,374 @@ +{ + "description": "backpressure-retryable-commit", + "schemaVersion": "1.4", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "topologies": [ + "sharded", + "replicaset", + "load-balanced" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "client0", + "useMultipleMongoses": false, + "observeEvents": [ + "commandStartedEvent" + ] + } + }, + { + "database": { + "id": "database0", + "client": "client0", + "databaseName": "transaction-tests" + } + }, + { + "collection": { + "id": "collection0", + "database": "database0", + "collectionName": "test" + } + }, + { + "session": { + "id": "session0", + "client": "client0" + } + } + ], + "initialData": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ], + "tests": [ + { + "description": "commitTransaction retries if backpressure labels are added", + "runOnRequirements": [ + { + "serverless": "forbid" + } + ], + "operations": [ + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "times": 2 + }, + "data": { + "failCommands": [ + "commitTransaction" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "session0", + "name": "commitTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": true, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "commitTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "commitTransaction", + "databaseName": "admin" + } + }, + { + "commandStartedEvent": { + "command": { + "commitTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "commitTransaction", + "databaseName": "admin" + } + }, + { + "commandStartedEvent": { + "command": { + "commitTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "commitTransaction", + "databaseName": "admin" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [ + { + "_id": 1 + } + ] + } + ] + }, + { + "description": "commitTransaction is retried maxAttempts=5 times if backpressure labels are added", + "runOnRequirements": [ + { + "serverless": "forbid" + } + ], + "operations": [ + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": "alwaysOn", + "data": { + "failCommands": [ + "commitTransaction" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "session0", + "name": "commitTransaction", + "expectError": { + "isError": true + } + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": true, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "commitTransaction": 1, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "commitTransaction", + "databaseName": "admin" + } + }, + { + "commandStartedEvent": { + "commandName": "commitTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "commitTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "commitTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "commitTransaction" + } + }, + { + "commandStartedEvent": { + "commandName": "commitTransaction" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ] + } + ] +} diff --git a/test/transactions/unified/backpressure-retryable-reads.json b/test/transactions/unified/backpressure-retryable-reads.json new file mode 100644 index 0000000000..731762830e --- /dev/null +++ b/test/transactions/unified/backpressure-retryable-reads.json @@ -0,0 +1,328 @@ +{ + "description": "backpressure-retryable-reads", + "schemaVersion": "1.3", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "topologies": [ + "replicaset", + "sharded", + "load-balanced" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "client0", + "useMultipleMongoses": false, + "observeEvents": [ + "commandStartedEvent" + ] + } + }, + { + "database": { + "id": "database0", + "client": "client0", + "databaseName": "transaction-tests" + } + }, + { + "collection": { + "id": "collection0", + "database": "database0", + "collectionName": "test" + } + }, + { + "session": { + "id": "session0", + "client": "client0" + } + } + ], + "initialData": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ], + "tests": [ + { + "description": "reads are retried if backpressure labels are added", + "operations": [ + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "times": 1 + }, + "data": { + "failCommands": [ + "find" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "collection0", + "name": "find", + "arguments": { + "filter": {}, + "session": "session0" + } + }, + { + "object": "session0", + "name": "commitTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": true, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "find": "test", + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "find", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "find": "test", + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "find", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "commitTransaction", + "databaseName": "admin" + } + } + ] + } + ] + }, + { + "description": "reads are retried maxAttempts=5 times if backpressure labels are added", + "operations": [ + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": "alwaysOn", + "data": { + "failCommands": [ + "find" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "collection0", + "name": "find", + "arguments": { + "filter": {}, + "session": "session0" + }, + "expectError": { + "isError": true + } + }, + { + "object": "session0", + "name": "abortTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "find" + } + }, + { + "commandStartedEvent": { + "commandName": "find" + } + }, + { + "commandStartedEvent": { + "commandName": "find" + } + }, + { + "commandStartedEvent": { + "commandName": "find" + } + }, + { + "commandStartedEvent": { + "commandName": "find" + } + }, + { + "commandStartedEvent": { + "commandName": "find" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + } + ] + } + ] + } + ] +} diff --git a/test/transactions/unified/backpressure-retryable-writes.json b/test/transactions/unified/backpressure-retryable-writes.json new file mode 100644 index 0000000000..eea0e6b5da --- /dev/null +++ b/test/transactions/unified/backpressure-retryable-writes.json @@ -0,0 +1,454 @@ +{ + "description": "backpressure-retryable-writes", + "schemaVersion": "1.3", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "topologies": [ + "replicaset", + "sharded", + "load-balanced" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "client0", + "useMultipleMongoses": false, + "observeEvents": [ + "commandStartedEvent" + ] + } + }, + { + "database": { + "id": "database0", + "client": "client0", + "databaseName": "transaction-tests" + } + }, + { + "collection": { + "id": "collection0", + "database": "database0", + "collectionName": "test" + } + }, + { + "session": { + "id": "session0", + "client": "client0" + } + } + ], + "initialData": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ], + "tests": [ + { + "description": "writes are retried if backpressure labels are added", + "operations": [ + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "times": 1 + }, + "data": { + "failCommands": [ + "insert" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 2 + } + } + }, + { + "object": "session0", + "name": "commitTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 1 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": true, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 2 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "insert": "test", + "documents": [ + { + "_id": 2 + } + ], + "ordered": true, + "readConcern": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "abortTransaction": { + "$$exists": false + }, + "lsid": { + "$$sessionLsid": "session0" + }, + "txnNumber": { + "$numberLong": "1" + }, + "startTransaction": { + "$$exists": false + }, + "autocommit": false, + "writeConcern": { + "$$exists": false + } + }, + "commandName": "commitTransaction", + "databaseName": "admin" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [ + { + "_id": 1 + }, + { + "_id": 2 + } + ] + } + ] + }, + { + "description": "writes are retried maxAttempts=5 times if backpressure labels are added", + "operations": [ + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 1 + } + }, + "expectResult": { + "$$unsetOrMatches": { + "insertedId": { + "$$unsetOrMatches": 1 + } + } + } + }, + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": "alwaysOn", + "data": { + "failCommands": [ + "insert" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 2 + } + }, + "expectError": { + "isError": true + } + }, + { + "object": "session0", + "name": "abortTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "insert" + } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ] + }, + { + "description": "retry succeeds if backpressure labels are added to the first operation in a transaction", + "operations": [ + { + "object": "session0", + "name": "startTransaction" + }, + { + "object": "testRunner", + "name": "failPoint", + "arguments": { + "client": "client0", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "times": 1 + }, + "data": { + "failCommands": [ + "insert" + ], + "errorLabels": [ + "RetryableError", + "SystemOverloadedError" + ], + "errorCode": 112 + } + } + } + }, + { + "object": "collection0", + "name": "insertOne", + "arguments": { + "session": "session0", + "document": { + "_id": 2 + } + } + }, + { + "object": "session0", + "name": "abortTransaction" + } + ], + "expectEvents": [ + { + "client": "client0", + "events": [ + { + "commandStartedEvent": { + "command": { + "startTransaction": true + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "startTransaction": true + }, + "commandName": "insert", + "databaseName": "transaction-tests" + } + }, + { + "commandStartedEvent": { + "command": { + "startTransaction": { + "$$exists": false + } + }, + "commandName": "abortTransaction", + "databaseName": "admin" + } + } + ] + } + ], + "outcome": [ + { + "collectionName": "test", + "databaseName": "transaction-tests", + "documents": [] + } + ] + } + ] +} diff --git a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json new file mode 100644 index 0000000000..8fe5c150a1 --- /dev/null +++ b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json @@ -0,0 +1,31 @@ +{ + "description": "clientEncryptionOpts-kmsProviders-azure-accessToken-type", + "schemaVersion": "1.28", + "createEntities": [ + { + "client": { + "id": "client0" + } + }, + { + "clientEncryption": { + "id": "clientEncryption0", + "clientEncryptionOpts": { + "keyVaultClient": "client0", + "keyVaultNamespace": "keyvault.datakeys", + "kmsProviders": { + "azure": { + "accessToken": 0 + } + } + } + } + } + ], + "tests": [ + { + "description": "", + "operations": [] + } + ] +} diff --git a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json new file mode 100644 index 0000000000..2284e26cb6 --- /dev/null +++ b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json @@ -0,0 +1,31 @@ +{ + "description": "clientEncryptionOpts-kmsProviders-gcp-accessToken-type", + "schemaVersion": "1.28", + "createEntities": [ + { + "client": { + "id": "client0" + } + }, + { + "clientEncryption": { + "id": "clientEncryption0", + "clientEncryptionOpts": { + "keyVaultClient": "client0", + "keyVaultNamespace": "keyvault.datakeys", + "kmsProviders": { + "gcp": { + "accessToken": 0 + } + } + } + } + } + ], + "tests": [ + { + "description": "", + "operations": [] + } + ] +} diff --git a/test/uri_options/client-backpressure-options.json b/test/uri_options/client-backpressure-options.json new file mode 100644 index 0000000000..3fcf2c86b0 --- /dev/null +++ b/test/uri_options/client-backpressure-options.json @@ -0,0 +1,35 @@ +{ + "tests": [ + { + "description": "adaptiveRetries=true is parsed correctly", + "uri": "mongodb://example.com/?adaptiveRetries=true", + "valid": true, + "warning": false, + "hosts": null, + "auth": null, + "options": { + "adaptiveRetries": true + } + }, + { + "description": "adaptiveRetries=false is parsed correctly", + "uri": "mongodb://example.com/?adaptiveRetries=false", + "valid": true, + "warning": false, + "hosts": null, + "auth": null, + "options": { + "adaptiveRetries": false + } + }, + { + "description": "adaptiveRetries with invalid value causes a warning", + "uri": "mongodb://example.com/?adaptiveRetries=invalid", + "valid": true, + "warning": true, + "hosts": null, + "auth": null, + "options": null + } + ] +} From 993f3f9e64eea8573df49b248915a6b8c435c4b8 Mon Sep 17 00:00:00 2001 From: Iris Ho Date: Mon, 30 Mar 2026 10:57:07 -0700 Subject: [PATCH 2/4] add patch for backpressure tests --- .evergreen/spec-patch/PYTHON-5668.patch | 1537 +++++++++++++++++ .../spec/unified/accessToken-azure.json | 186 -- .../spec/unified/accessToken-gcp.json | 188 -- .../unified/backpressure-retryable-abort.json | 357 ---- .../backpressure-retryable-commit.json | 374 ---- .../unified/backpressure-retryable-reads.json | 328 ---- .../backpressure-retryable-writes.json | 454 ----- 7 files changed, 1537 insertions(+), 1887 deletions(-) create mode 100644 .evergreen/spec-patch/PYTHON-5668.patch delete mode 100644 test/client-side-encryption/spec/unified/accessToken-azure.json delete mode 100644 test/client-side-encryption/spec/unified/accessToken-gcp.json delete mode 100644 test/transactions/unified/backpressure-retryable-abort.json delete mode 100644 test/transactions/unified/backpressure-retryable-commit.json delete mode 100644 test/transactions/unified/backpressure-retryable-reads.json delete mode 100644 test/transactions/unified/backpressure-retryable-writes.json diff --git a/.evergreen/spec-patch/PYTHON-5668.patch b/.evergreen/spec-patch/PYTHON-5668.patch new file mode 100644 index 0000000000..c2e66dfab7 --- /dev/null +++ b/.evergreen/spec-patch/PYTHON-5668.patch @@ -0,0 +1,1537 @@ +diff --git a/test/transactions/unified/backpressure-retryable-abort.json b/test/transactions/unified/backpressure-retryable-abort.json +new file mode 100644 +index 00000000..53fc9c6f +--- /dev/null ++++ b/test/transactions/unified/backpressure-retryable-abort.json +@@ -0,0 +1,357 @@ ++{ ++ "description": "backpressure-retryable-abort", ++ "schemaVersion": "1.3", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "topologies": [ ++ "replicaset", ++ "sharded", ++ "load-balanced" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client0", ++ "useMultipleMongoses": false, ++ "observeEvents": [ ++ "commandStartedEvent" ++ ] ++ } ++ }, ++ { ++ "database": { ++ "id": "database0", ++ "client": "client0", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "collection": { ++ "id": "collection0", ++ "database": "database0", ++ "collectionName": "test" ++ } ++ }, ++ { ++ "session": { ++ "id": "session0", ++ "client": "client0" ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "abortTransaction retries if backpressure labels are added", ++ "operations": [ ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": { ++ "times": 2 ++ }, ++ "data": { ++ "failCommands": [ ++ "abortTransaction" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "abortTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": true, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "abortTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "abortTransaction", ++ "databaseName": "admin" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "abortTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "abortTransaction", ++ "databaseName": "admin" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "abortTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "abortTransaction", ++ "databaseName": "admin" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ] ++ }, ++ { ++ "description": "abortTransaction is retried maxAttempts=5 times if backpressure labels are added", ++ "operations": [ ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": "alwaysOn", ++ "data": { ++ "failCommands": [ ++ "abortTransaction" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "abortTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": true, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "abortTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "abortTransaction", ++ "databaseName": "admin" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/transactions/unified/backpressure-retryable-commit.json b/test/transactions/unified/backpressure-retryable-commit.json +new file mode 100644 +index 00000000..ae873561 +--- /dev/null ++++ b/test/transactions/unified/backpressure-retryable-commit.json +@@ -0,0 +1,374 @@ ++{ ++ "description": "backpressure-retryable-commit", ++ "schemaVersion": "1.4", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "topologies": [ ++ "sharded", ++ "replicaset", ++ "load-balanced" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client0", ++ "useMultipleMongoses": false, ++ "observeEvents": [ ++ "commandStartedEvent" ++ ] ++ } ++ }, ++ { ++ "database": { ++ "id": "database0", ++ "client": "client0", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "collection": { ++ "id": "collection0", ++ "database": "database0", ++ "collectionName": "test" ++ } ++ }, ++ { ++ "session": { ++ "id": "session0", ++ "client": "client0" ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "commitTransaction retries if backpressure labels are added", ++ "runOnRequirements": [ ++ { ++ "serverless": "forbid" ++ } ++ ], ++ "operations": [ ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": { ++ "times": 2 ++ }, ++ "data": { ++ "failCommands": [ ++ "commitTransaction" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "commitTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": true, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "commitTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "commitTransaction", ++ "databaseName": "admin" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "commitTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "commitTransaction", ++ "databaseName": "admin" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "commitTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "commitTransaction", ++ "databaseName": "admin" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ] ++ } ++ ] ++ }, ++ { ++ "description": "commitTransaction is retried maxAttempts=5 times if backpressure labels are added", ++ "runOnRequirements": [ ++ { ++ "serverless": "forbid" ++ } ++ ], ++ "operations": [ ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": "alwaysOn", ++ "data": { ++ "failCommands": [ ++ "commitTransaction" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "commitTransaction", ++ "expectError": { ++ "isError": true ++ } ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": true, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "commitTransaction": 1, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "commitTransaction", ++ "databaseName": "admin" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "commitTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "commitTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "commitTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "commitTransaction" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "commitTransaction" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/transactions/unified/backpressure-retryable-reads.json b/test/transactions/unified/backpressure-retryable-reads.json +new file mode 100644 +index 00000000..73176283 +--- /dev/null ++++ b/test/transactions/unified/backpressure-retryable-reads.json +@@ -0,0 +1,328 @@ ++{ ++ "description": "backpressure-retryable-reads", ++ "schemaVersion": "1.3", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "topologies": [ ++ "replicaset", ++ "sharded", ++ "load-balanced" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client0", ++ "useMultipleMongoses": false, ++ "observeEvents": [ ++ "commandStartedEvent" ++ ] ++ } ++ }, ++ { ++ "database": { ++ "id": "database0", ++ "client": "client0", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "collection": { ++ "id": "collection0", ++ "database": "database0", ++ "collectionName": "test" ++ } ++ }, ++ { ++ "session": { ++ "id": "session0", ++ "client": "client0" ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "reads are retried if backpressure labels are added", ++ "operations": [ ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": { ++ "times": 1 ++ }, ++ "data": { ++ "failCommands": [ ++ "find" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "collection0", ++ "name": "find", ++ "arguments": { ++ "filter": {}, ++ "session": "session0" ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "commitTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": true, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "find": "test", ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "find", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "find": "test", ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "find", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "abortTransaction": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "commitTransaction", ++ "databaseName": "admin" ++ } ++ } ++ ] ++ } ++ ] ++ }, ++ { ++ "description": "reads are retried maxAttempts=5 times if backpressure labels are added", ++ "operations": [ ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": "alwaysOn", ++ "data": { ++ "failCommands": [ ++ "find" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "collection0", ++ "name": "find", ++ "arguments": { ++ "filter": {}, ++ "session": "session0" ++ }, ++ "expectError": { ++ "isError": true ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "abortTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "find" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "find" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "find" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "find" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "find" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "find" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ } ++ ] ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/transactions/unified/backpressure-retryable-writes.json b/test/transactions/unified/backpressure-retryable-writes.json +new file mode 100644 +index 00000000..eea0e6b5 +--- /dev/null ++++ b/test/transactions/unified/backpressure-retryable-writes.json +@@ -0,0 +1,454 @@ ++{ ++ "description": "backpressure-retryable-writes", ++ "schemaVersion": "1.3", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "topologies": [ ++ "replicaset", ++ "sharded", ++ "load-balanced" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client0", ++ "useMultipleMongoses": false, ++ "observeEvents": [ ++ "commandStartedEvent" ++ ] ++ } ++ }, ++ { ++ "database": { ++ "id": "database0", ++ "client": "client0", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "collection": { ++ "id": "collection0", ++ "database": "database0", ++ "collectionName": "test" ++ } ++ }, ++ { ++ "session": { ++ "id": "session0", ++ "client": "client0" ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "writes are retried if backpressure labels are added", ++ "operations": [ ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": { ++ "times": 1 ++ }, ++ "data": { ++ "failCommands": [ ++ "insert" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 2 ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "commitTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 1 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": true, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 2 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "insert": "test", ++ "documents": [ ++ { ++ "_id": 2 ++ } ++ ], ++ "ordered": true, ++ "readConcern": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "abortTransaction": { ++ "$$exists": false ++ }, ++ "lsid": { ++ "$$sessionLsid": "session0" ++ }, ++ "txnNumber": { ++ "$numberLong": "1" ++ }, ++ "startTransaction": { ++ "$$exists": false ++ }, ++ "autocommit": false, ++ "writeConcern": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "commitTransaction", ++ "databaseName": "admin" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [ ++ { ++ "_id": 1 ++ }, ++ { ++ "_id": 2 ++ } ++ ] ++ } ++ ] ++ }, ++ { ++ "description": "writes are retried maxAttempts=5 times if backpressure labels are added", ++ "operations": [ ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 1 ++ } ++ }, ++ "expectResult": { ++ "$$unsetOrMatches": { ++ "insertedId": { ++ "$$unsetOrMatches": 1 ++ } ++ } ++ } ++ }, ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": "alwaysOn", ++ "data": { ++ "failCommands": [ ++ "insert" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 2 ++ } ++ }, ++ "expectError": { ++ "isError": true ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "abortTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "insert" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "commandName": "abortTransaction" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ] ++ }, ++ { ++ "description": "retry succeeds if backpressure labels are added to the first operation in a transaction", ++ "operations": [ ++ { ++ "object": "session0", ++ "name": "startTransaction" ++ }, ++ { ++ "object": "testRunner", ++ "name": "failPoint", ++ "arguments": { ++ "client": "client0", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": { ++ "times": 1 ++ }, ++ "data": { ++ "failCommands": [ ++ "insert" ++ ], ++ "errorLabels": [ ++ "RetryableError", ++ "SystemOverloadedError" ++ ], ++ "errorCode": 112 ++ } ++ } ++ } ++ }, ++ { ++ "object": "collection0", ++ "name": "insertOne", ++ "arguments": { ++ "session": "session0", ++ "document": { ++ "_id": 2 ++ } ++ } ++ }, ++ { ++ "object": "session0", ++ "name": "abortTransaction" ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client0", ++ "events": [ ++ { ++ "commandStartedEvent": { ++ "command": { ++ "startTransaction": true ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "startTransaction": true ++ }, ++ "commandName": "insert", ++ "databaseName": "transaction-tests" ++ } ++ }, ++ { ++ "commandStartedEvent": { ++ "command": { ++ "startTransaction": { ++ "$$exists": false ++ } ++ }, ++ "commandName": "abortTransaction", ++ "databaseName": "admin" ++ } ++ } ++ ] ++ } ++ ], ++ "outcome": [ ++ { ++ "collectionName": "test", ++ "databaseName": "transaction-tests", ++ "documents": [] ++ } ++ ] ++ } ++ ] ++} diff --git a/test/client-side-encryption/spec/unified/accessToken-azure.json b/test/client-side-encryption/spec/unified/accessToken-azure.json deleted file mode 100644 index 510d87956f..0000000000 --- a/test/client-side-encryption/spec/unified/accessToken-azure.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "description": "accessToken-azure", - "schemaVersion": "1.28", - "runOnRequirements": [ - { - "minServerVersion": "4.1.10", - "csfle": { - "minLibmongocryptVersion": "1.6.0" - } - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "autoEncryptOpts": { - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "azure": { - "accessToken": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "db" - } - }, - { - "collection": { - "id": "coll", - "database": "db", - "collectionName": "coll" - } - }, - { - "clientEncryption": { - "id": "clientEncryption", - "clientEncryptionOpts": { - "keyVaultClient": "client", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "azure": { - "accessToken": { - "$$placeholder": 1 - } - } - } - } - } - } - ], - "initialData": [ - { - "databaseName": "db", - "collectionName": "coll", - "documents": [], - "createOptions": { - "validator": { - "$jsonSchema": { - "properties": { - "secret": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "AZURE+AAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "keyAltNames": [ - "my-key" - ], - "keyMaterial": { - "$binary": { - "base64": "n+HWZ0ZSVOYA3cvQgP7inN4JSXfOH85IngmeQxRpQHjCCcqT3IFqEWNlrsVHiz3AELimHhX4HKqOLWMUeSIT6emUDDoQX9BAv8DR1+E1w4nGs/NyEneac78EYFkK3JysrFDOgl2ypCCTKAypkn9CkAx1if4cfgQE93LW4kczcyHdGiH36CIxrCDGv1UzAvERN5Qa47DVwsM6a+hWsF2AAAJVnF0wYLLJU07TuRHdMrrphPWXZsFgyV+lRqJ7DDpReKNO8nMPLV/mHqHBHGPGQiRdb9NoJo8CvokGz4+KE8oLwzKf6V24dtwZmRkrsDV4iOhvROAzz+Euo1ypSkL3mw==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "azure", - "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", - "keyName": "key-name-csfle" - } - } - ] - } - ], - "tests": [ - { - "description": "Auto encrypt using access token Azure credentials", - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "secret": "string0" - } - }, - "object": "coll" - } - ], - "outcome": [ - { - "documents": [ - { - "_id": 1, - "secret": { - "$binary": { - "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", - "subType": "06" - } - } - } - ], - "collectionName": "coll", - "databaseName": "db" - } - ] - }, - { - "description": "Explicit encrypt using access token Azure credentials", - "operations": [ - { - "name": "encrypt", - "object": "clientEncryption", - "arguments": { - "value": "string0", - "opts": { - "keyAltName": "my-key", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "expectResult": { - "$binary": { - "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", - "subType": "06" - } - } - } - ] - } - ] -} diff --git a/test/client-side-encryption/spec/unified/accessToken-gcp.json b/test/client-side-encryption/spec/unified/accessToken-gcp.json deleted file mode 100644 index f5cf8914f2..0000000000 --- a/test/client-side-encryption/spec/unified/accessToken-gcp.json +++ /dev/null @@ -1,188 +0,0 @@ -{ - "description": "accessToken-gcp", - "schemaVersion": "1.28", - "runOnRequirements": [ - { - "minServerVersion": "4.1.10", - "csfle": { - "minLibmongocryptVersion": "1.6.0" - } - } - ], - "createEntities": [ - { - "client": { - "id": "client", - "autoEncryptOpts": { - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "gcp": { - "accessToken": { - "$$placeholder": 1 - } - } - } - } - } - }, - { - "database": { - "id": "db", - "client": "client", - "databaseName": "db" - } - }, - { - "collection": { - "id": "coll", - "database": "db", - "collectionName": "coll" - } - }, - { - "clientEncryption": { - "id": "clientEncryption", - "clientEncryptionOpts": { - "keyVaultClient": "client", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "gcp": { - "accessToken": { - "$$placeholder": 1 - } - } - } - } - } - } - ], - "initialData": [ - { - "databaseName": "db", - "collectionName": "coll", - "documents": [], - "createOptions": { - "validator": { - "$jsonSchema": { - "properties": { - "secret": { - "encrypt": { - "keyId": [ - { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - } - ], - "bsonType": "string", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - } - }, - "bsonType": "object" - } - } - } - }, - { - "databaseName": "keyvault", - "collectionName": "datakeys", - "documents": [ - { - "_id": { - "$binary": { - "base64": "GCP+AAAAAAAAAAAAAAAAAA==", - "subType": "04" - } - }, - "keyAltNames": [ - "my-key" - ], - "keyMaterial": { - "$binary": { - "base64": "CiQAIgLj0WyktnB4dfYHo5SLZ41K4ASQrjJUaSzl5vvVH0G12G0SiQEAjlV8XPlbnHDEDFbdTO4QIe8ER2/172U1ouLazG0ysDtFFIlSvWX5ZnZUrRMmp/R2aJkzLXEt/zf8Mn4Lfm+itnjgo5R9K4pmPNvvPKNZX5C16lrPT+aA+rd+zXFSmlMg3i5jnxvTdLHhg3G7Q/Uv1ZIJskKt95bzLoe0tUVzRWMYXLIEcohnQg==", - "subType": "00" - } - }, - "creationDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "updateDate": { - "$date": { - "$numberLong": "1552949630483" - } - }, - "status": { - "$numberInt": "0" - }, - "masterKey": { - "provider": "gcp", - "projectId": "devprod-drivers", - "location": "global", - "keyRing": "key-ring-csfle", - "keyName": "key-name-csfle" - } - } - ] - } - ], - "tests": [ - { - "description": "Auto encrypt using access token GCP credentials", - "operations": [ - { - "name": "insertOne", - "arguments": { - "document": { - "_id": 1, - "secret": "string0" - } - }, - "object": "coll" - } - ], - "outcome": [ - { - "documents": [ - { - "_id": 1, - "secret": { - "$binary": { - "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", - "subType": "06" - } - } - } - ], - "collectionName": "coll", - "databaseName": "db" - } - ] - }, - { - "description": "Explicit encrypt using access token GCP credentials", - "operations": [ - { - "name": "encrypt", - "object": "clientEncryption", - "arguments": { - "value": "string0", - "opts": { - "keyAltName": "my-key", - "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" - } - }, - "expectResult": { - "$binary": { - "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", - "subType": "06" - } - } - } - ] - } - ] -} diff --git a/test/transactions/unified/backpressure-retryable-abort.json b/test/transactions/unified/backpressure-retryable-abort.json deleted file mode 100644 index 53fc9c6f09..0000000000 --- a/test/transactions/unified/backpressure-retryable-abort.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "description": "backpressure-retryable-abort", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "abortTransaction retries if backpressure labels are added", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ] - }, - { - "description": "abortTransaction is retried maxAttempts=5 times if backpressure labels are added", - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "abortTransaction" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ] - } - ] -} diff --git a/test/transactions/unified/backpressure-retryable-commit.json b/test/transactions/unified/backpressure-retryable-commit.json deleted file mode 100644 index ae873561a9..0000000000 --- a/test/transactions/unified/backpressure-retryable-commit.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "description": "backpressure-retryable-commit", - "schemaVersion": "1.4", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "sharded", - "replicaset", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "commitTransaction retries if backpressure labels are added", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 2 - }, - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "session0", - "name": "commitTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - } - ] - } - ] - }, - { - "description": "commitTransaction is retried maxAttempts=5 times if backpressure labels are added", - "runOnRequirements": [ - { - "serverless": "forbid" - } - ], - "operations": [ - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "commitTransaction" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "session0", - "name": "commitTransaction", - "expectError": { - "isError": true - } - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "commitTransaction": 1, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - }, - { - "commandStartedEvent": { - "commandName": "commitTransaction" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ] - } - ] -} diff --git a/test/transactions/unified/backpressure-retryable-reads.json b/test/transactions/unified/backpressure-retryable-reads.json deleted file mode 100644 index 731762830e..0000000000 --- a/test/transactions/unified/backpressure-retryable-reads.json +++ /dev/null @@ -1,328 +0,0 @@ -{ - "description": "backpressure-retryable-reads", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "reads are retried if backpressure labels are added", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "find" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "session": "session0" - } - }, - { - "object": "session0", - "name": "commitTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "find", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "find": "test", - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "find", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ] - }, - { - "description": "reads are retried maxAttempts=5 times if backpressure labels are added", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "find" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "collection0", - "name": "find", - "arguments": { - "filter": {}, - "session": "session0" - }, - "expectError": { - "isError": true - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "find" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - } - ] - } - ] -} diff --git a/test/transactions/unified/backpressure-retryable-writes.json b/test/transactions/unified/backpressure-retryable-writes.json deleted file mode 100644 index eea0e6b5da..0000000000 --- a/test/transactions/unified/backpressure-retryable-writes.json +++ /dev/null @@ -1,454 +0,0 @@ -{ - "description": "backpressure-retryable-writes", - "schemaVersion": "1.3", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "topologies": [ - "replicaset", - "sharded", - "load-balanced" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "client0", - "useMultipleMongoses": false, - "observeEvents": [ - "commandStartedEvent" - ] - } - }, - { - "database": { - "id": "database0", - "client": "client0", - "databaseName": "transaction-tests" - } - }, - { - "collection": { - "id": "collection0", - "database": "database0", - "collectionName": "test" - } - }, - { - "session": { - "id": "session0", - "client": "client0" - } - } - ], - "initialData": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ], - "tests": [ - { - "description": "writes are retried if backpressure labels are added", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - } - }, - { - "object": "session0", - "name": "commitTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 1 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": true, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "insert": "test", - "documents": [ - { - "_id": 2 - } - ], - "ordered": true, - "readConcern": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "abortTransaction": { - "$$exists": false - }, - "lsid": { - "$$sessionLsid": "session0" - }, - "txnNumber": { - "$numberLong": "1" - }, - "startTransaction": { - "$$exists": false - }, - "autocommit": false, - "writeConcern": { - "$$exists": false - } - }, - "commandName": "commitTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ] - }, - { - "description": "writes are retried maxAttempts=5 times if backpressure labels are added", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 1 - } - }, - "expectResult": { - "$$unsetOrMatches": { - "insertedId": { - "$$unsetOrMatches": 1 - } - } - } - }, - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "insert" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - }, - "expectError": { - "isError": true - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "insert" - } - }, - { - "commandStartedEvent": { - "commandName": "abortTransaction" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ] - }, - { - "description": "retry succeeds if backpressure labels are added to the first operation in a transaction", - "operations": [ - { - "object": "session0", - "name": "startTransaction" - }, - { - "object": "testRunner", - "name": "failPoint", - "arguments": { - "client": "client0", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "times": 1 - }, - "data": { - "failCommands": [ - "insert" - ], - "errorLabels": [ - "RetryableError", - "SystemOverloadedError" - ], - "errorCode": 112 - } - } - } - }, - { - "object": "collection0", - "name": "insertOne", - "arguments": { - "session": "session0", - "document": { - "_id": 2 - } - } - }, - { - "object": "session0", - "name": "abortTransaction" - } - ], - "expectEvents": [ - { - "client": "client0", - "events": [ - { - "commandStartedEvent": { - "command": { - "startTransaction": true - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "startTransaction": true - }, - "commandName": "insert", - "databaseName": "transaction-tests" - } - }, - { - "commandStartedEvent": { - "command": { - "startTransaction": { - "$$exists": false - } - }, - "commandName": "abortTransaction", - "databaseName": "admin" - } - } - ] - } - ], - "outcome": [ - { - "collectionName": "test", - "databaseName": "transaction-tests", - "documents": [] - } - ] - } - ] -} From f2fe21cca8f594fe27fa255c1587e31f0f8e23f0 Mon Sep 17 00:00:00 2001 From: Iris Ho Date: Mon, 30 Mar 2026 11:34:19 -0700 Subject: [PATCH 3/4] add patch for PYTHON-5759 --- .evergreen/spec-patch/PYTHON-5759.patch | 460 ++++++++++++++++++ ...s-kmsProviders-azure-accessToken-type.json | 31 -- ...pts-kmsProviders-gcp-accessToken-type.json | 31 -- 3 files changed, 460 insertions(+), 62 deletions(-) create mode 100644 .evergreen/spec-patch/PYTHON-5759.patch delete mode 100644 test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json delete mode 100644 test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json diff --git a/.evergreen/spec-patch/PYTHON-5759.patch b/.evergreen/spec-patch/PYTHON-5759.patch new file mode 100644 index 0000000000..3b19ed065e --- /dev/null +++ b/.evergreen/spec-patch/PYTHON-5759.patch @@ -0,0 +1,460 @@ +diff --git a/test/client-side-encryption/spec/unified/accessToken-azure.json b/test/client-side-encryption/spec/unified/accessToken-azure.json +new file mode 100644 +index 00000000..510d8795 +--- /dev/null ++++ b/test/client-side-encryption/spec/unified/accessToken-azure.json +@@ -0,0 +1,186 @@ ++{ ++ "description": "accessToken-azure", ++ "schemaVersion": "1.28", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.1.10", ++ "csfle": { ++ "minLibmongocryptVersion": "1.6.0" ++ } ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client", ++ "autoEncryptOpts": { ++ "keyVaultNamespace": "keyvault.datakeys", ++ "kmsProviders": { ++ "azure": { ++ "accessToken": { ++ "$$placeholder": 1 ++ } ++ } ++ } ++ } ++ } ++ }, ++ { ++ "database": { ++ "id": "db", ++ "client": "client", ++ "databaseName": "db" ++ } ++ }, ++ { ++ "collection": { ++ "id": "coll", ++ "database": "db", ++ "collectionName": "coll" ++ } ++ }, ++ { ++ "clientEncryption": { ++ "id": "clientEncryption", ++ "clientEncryptionOpts": { ++ "keyVaultClient": "client", ++ "keyVaultNamespace": "keyvault.datakeys", ++ "kmsProviders": { ++ "azure": { ++ "accessToken": { ++ "$$placeholder": 1 ++ } ++ } ++ } ++ } ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "databaseName": "db", ++ "collectionName": "coll", ++ "documents": [], ++ "createOptions": { ++ "validator": { ++ "$jsonSchema": { ++ "properties": { ++ "secret": { ++ "encrypt": { ++ "keyId": [ ++ { ++ "$binary": { ++ "base64": "AZURE+AAAAAAAAAAAAAAAA==", ++ "subType": "04" ++ } ++ } ++ ], ++ "bsonType": "string", ++ "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" ++ } ++ } ++ }, ++ "bsonType": "object" ++ } ++ } ++ } ++ }, ++ { ++ "databaseName": "keyvault", ++ "collectionName": "datakeys", ++ "documents": [ ++ { ++ "_id": { ++ "$binary": { ++ "base64": "AZURE+AAAAAAAAAAAAAAAA==", ++ "subType": "04" ++ } ++ }, ++ "keyAltNames": [ ++ "my-key" ++ ], ++ "keyMaterial": { ++ "$binary": { ++ "base64": "n+HWZ0ZSVOYA3cvQgP7inN4JSXfOH85IngmeQxRpQHjCCcqT3IFqEWNlrsVHiz3AELimHhX4HKqOLWMUeSIT6emUDDoQX9BAv8DR1+E1w4nGs/NyEneac78EYFkK3JysrFDOgl2ypCCTKAypkn9CkAx1if4cfgQE93LW4kczcyHdGiH36CIxrCDGv1UzAvERN5Qa47DVwsM6a+hWsF2AAAJVnF0wYLLJU07TuRHdMrrphPWXZsFgyV+lRqJ7DDpReKNO8nMPLV/mHqHBHGPGQiRdb9NoJo8CvokGz4+KE8oLwzKf6V24dtwZmRkrsDV4iOhvROAzz+Euo1ypSkL3mw==", ++ "subType": "00" ++ } ++ }, ++ "creationDate": { ++ "$date": { ++ "$numberLong": "1552949630483" ++ } ++ }, ++ "updateDate": { ++ "$date": { ++ "$numberLong": "1552949630483" ++ } ++ }, ++ "status": { ++ "$numberInt": "0" ++ }, ++ "masterKey": { ++ "provider": "azure", ++ "keyVaultEndpoint": "key-vault-csfle.vault.azure.net", ++ "keyName": "key-name-csfle" ++ } ++ } ++ ] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "Auto encrypt using access token Azure credentials", ++ "operations": [ ++ { ++ "name": "insertOne", ++ "arguments": { ++ "document": { ++ "_id": 1, ++ "secret": "string0" ++ } ++ }, ++ "object": "coll" ++ } ++ ], ++ "outcome": [ ++ { ++ "documents": [ ++ { ++ "_id": 1, ++ "secret": { ++ "$binary": { ++ "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", ++ "subType": "06" ++ } ++ } ++ } ++ ], ++ "collectionName": "coll", ++ "databaseName": "db" ++ } ++ ] ++ }, ++ { ++ "description": "Explicit encrypt using access token Azure credentials", ++ "operations": [ ++ { ++ "name": "encrypt", ++ "object": "clientEncryption", ++ "arguments": { ++ "value": "string0", ++ "opts": { ++ "keyAltName": "my-key", ++ "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" ++ } ++ }, ++ "expectResult": { ++ "$binary": { ++ "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==", ++ "subType": "06" ++ } ++ } ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/client-side-encryption/spec/unified/accessToken-gcp.json b/test/client-side-encryption/spec/unified/accessToken-gcp.json +new file mode 100644 +index 00000000..f5cf8914 +--- /dev/null ++++ b/test/client-side-encryption/spec/unified/accessToken-gcp.json +@@ -0,0 +1,188 @@ ++{ ++ "description": "accessToken-gcp", ++ "schemaVersion": "1.28", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.1.10", ++ "csfle": { ++ "minLibmongocryptVersion": "1.6.0" ++ } ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client", ++ "autoEncryptOpts": { ++ "keyVaultNamespace": "keyvault.datakeys", ++ "kmsProviders": { ++ "gcp": { ++ "accessToken": { ++ "$$placeholder": 1 ++ } ++ } ++ } ++ } ++ } ++ }, ++ { ++ "database": { ++ "id": "db", ++ "client": "client", ++ "databaseName": "db" ++ } ++ }, ++ { ++ "collection": { ++ "id": "coll", ++ "database": "db", ++ "collectionName": "coll" ++ } ++ }, ++ { ++ "clientEncryption": { ++ "id": "clientEncryption", ++ "clientEncryptionOpts": { ++ "keyVaultClient": "client", ++ "keyVaultNamespace": "keyvault.datakeys", ++ "kmsProviders": { ++ "gcp": { ++ "accessToken": { ++ "$$placeholder": 1 ++ } ++ } ++ } ++ } ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "databaseName": "db", ++ "collectionName": "coll", ++ "documents": [], ++ "createOptions": { ++ "validator": { ++ "$jsonSchema": { ++ "properties": { ++ "secret": { ++ "encrypt": { ++ "keyId": [ ++ { ++ "$binary": { ++ "base64": "GCP+AAAAAAAAAAAAAAAAAA==", ++ "subType": "04" ++ } ++ } ++ ], ++ "bsonType": "string", ++ "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" ++ } ++ } ++ }, ++ "bsonType": "object" ++ } ++ } ++ } ++ }, ++ { ++ "databaseName": "keyvault", ++ "collectionName": "datakeys", ++ "documents": [ ++ { ++ "_id": { ++ "$binary": { ++ "base64": "GCP+AAAAAAAAAAAAAAAAAA==", ++ "subType": "04" ++ } ++ }, ++ "keyAltNames": [ ++ "my-key" ++ ], ++ "keyMaterial": { ++ "$binary": { ++ "base64": "CiQAIgLj0WyktnB4dfYHo5SLZ41K4ASQrjJUaSzl5vvVH0G12G0SiQEAjlV8XPlbnHDEDFbdTO4QIe8ER2/172U1ouLazG0ysDtFFIlSvWX5ZnZUrRMmp/R2aJkzLXEt/zf8Mn4Lfm+itnjgo5R9K4pmPNvvPKNZX5C16lrPT+aA+rd+zXFSmlMg3i5jnxvTdLHhg3G7Q/Uv1ZIJskKt95bzLoe0tUVzRWMYXLIEcohnQg==", ++ "subType": "00" ++ } ++ }, ++ "creationDate": { ++ "$date": { ++ "$numberLong": "1552949630483" ++ } ++ }, ++ "updateDate": { ++ "$date": { ++ "$numberLong": "1552949630483" ++ } ++ }, ++ "status": { ++ "$numberInt": "0" ++ }, ++ "masterKey": { ++ "provider": "gcp", ++ "projectId": "devprod-drivers", ++ "location": "global", ++ "keyRing": "key-ring-csfle", ++ "keyName": "key-name-csfle" ++ } ++ } ++ ] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "Auto encrypt using access token GCP credentials", ++ "operations": [ ++ { ++ "name": "insertOne", ++ "arguments": { ++ "document": { ++ "_id": 1, ++ "secret": "string0" ++ } ++ }, ++ "object": "coll" ++ } ++ ], ++ "outcome": [ ++ { ++ "documents": [ ++ { ++ "_id": 1, ++ "secret": { ++ "$binary": { ++ "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", ++ "subType": "06" ++ } ++ } ++ } ++ ], ++ "collectionName": "coll", ++ "databaseName": "db" ++ } ++ ] ++ }, ++ { ++ "description": "Explicit encrypt using access token GCP credentials", ++ "operations": [ ++ { ++ "name": "encrypt", ++ "object": "clientEncryption", ++ "arguments": { ++ "value": "string0", ++ "opts": { ++ "keyAltName": "my-key", ++ "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic" ++ } ++ }, ++ "expectResult": { ++ "$binary": { ++ "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==", ++ "subType": "06" ++ } ++ } ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json +new file mode 100644 +index 00000000..8fe5c150 +--- /dev/null ++++ b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json +@@ -0,0 +1,31 @@ ++{ ++ "description": "clientEncryptionOpts-kmsProviders-azure-accessToken-type", ++ "schemaVersion": "1.28", ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client0" ++ } ++ }, ++ { ++ "clientEncryption": { ++ "id": "clientEncryption0", ++ "clientEncryptionOpts": { ++ "keyVaultClient": "client0", ++ "keyVaultNamespace": "keyvault.datakeys", ++ "kmsProviders": { ++ "azure": { ++ "accessToken": 0 ++ } ++ } ++ } ++ } ++ } ++ ], ++ "tests": [ ++ { ++ "description": "", ++ "operations": [] ++ } ++ ] ++} +diff --git a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json +new file mode 100644 +index 00000000..2284e26c +--- /dev/null ++++ b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json +@@ -0,0 +1,31 @@ ++{ ++ "description": "clientEncryptionOpts-kmsProviders-gcp-accessToken-type", ++ "schemaVersion": "1.28", ++ "createEntities": [ ++ { ++ "client": { ++ "id": "client0" ++ } ++ }, ++ { ++ "clientEncryption": { ++ "id": "clientEncryption0", ++ "clientEncryptionOpts": { ++ "keyVaultClient": "client0", ++ "keyVaultNamespace": "keyvault.datakeys", ++ "kmsProviders": { ++ "gcp": { ++ "accessToken": 0 ++ } ++ } ++ } ++ } ++ } ++ ], ++ "tests": [ ++ { ++ "description": "", ++ "operations": [] ++ } ++ ] ++} diff --git a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json deleted file mode 100644 index 8fe5c150a1..0000000000 --- a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-azure-accessToken-type.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "clientEncryptionOpts-kmsProviders-azure-accessToken-type", - "schemaVersion": "1.28", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "azure": { - "accessToken": 0 - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} diff --git a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json b/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json deleted file mode 100644 index 2284e26cb6..0000000000 --- a/test/unified-test-format/invalid/clientEncryptionOpts-kmsProviders-gcp-accessToken-type.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "description": "clientEncryptionOpts-kmsProviders-gcp-accessToken-type", - "schemaVersion": "1.28", - "createEntities": [ - { - "client": { - "id": "client0" - } - }, - { - "clientEncryption": { - "id": "clientEncryption0", - "clientEncryptionOpts": { - "keyVaultClient": "client0", - "keyVaultNamespace": "keyvault.datakeys", - "kmsProviders": { - "gcp": { - "accessToken": 0 - } - } - } - } - } - ], - "tests": [ - { - "description": "", - "operations": [] - } - ] -} From 358a45d6761c6651f24f2544671e42b626f984f9 Mon Sep 17 00:00:00 2001 From: Iris Ho Date: Mon, 30 Mar 2026 14:19:36 -0700 Subject: [PATCH 4/4] remove more backpressure tests --- .evergreen/spec-patch/PYTHON-5668.patch | 41 +++++++++++++++++++ .../client-backpressure-options.json | 35 ---------------- 2 files changed, 41 insertions(+), 35 deletions(-) delete mode 100644 test/uri_options/client-backpressure-options.json diff --git a/.evergreen/spec-patch/PYTHON-5668.patch b/.evergreen/spec-patch/PYTHON-5668.patch index c2e66dfab7..d48b18fe65 100644 --- a/.evergreen/spec-patch/PYTHON-5668.patch +++ b/.evergreen/spec-patch/PYTHON-5668.patch @@ -1535,3 +1535,44 @@ index 00000000..eea0e6b5 + } + ] +} +diff --git b/test/uri_options/client-backpressure-options.json a/test/uri_options/client-backpressure-options.json +new file mode 100644 +index 00000000..3fcf2c86 +--- /dev/null ++++ a/test/uri_options/client-backpressure-options.json +@@ -0,0 +1,35 @@ ++{ ++ "tests": [ ++ { ++ "description": "adaptiveRetries=true is parsed correctly", ++ "uri": "mongodb://example.com/?adaptiveRetries=true", ++ "valid": true, ++ "warning": false, ++ "hosts": null, ++ "auth": null, ++ "options": { ++ "adaptiveRetries": true ++ } ++ }, ++ { ++ "description": "adaptiveRetries=false is parsed correctly", ++ "uri": "mongodb://example.com/?adaptiveRetries=false", ++ "valid": true, ++ "warning": false, ++ "hosts": null, ++ "auth": null, ++ "options": { ++ "adaptiveRetries": false ++ } ++ }, ++ { ++ "description": "adaptiveRetries with invalid value causes a warning", ++ "uri": "mongodb://example.com/?adaptiveRetries=invalid", ++ "valid": true, ++ "warning": true, ++ "hosts": null, ++ "auth": null, ++ "options": null ++ } ++ ] ++} diff --git a/test/uri_options/client-backpressure-options.json b/test/uri_options/client-backpressure-options.json deleted file mode 100644 index 3fcf2c86b0..0000000000 --- a/test/uri_options/client-backpressure-options.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "tests": [ - { - "description": "adaptiveRetries=true is parsed correctly", - "uri": "mongodb://example.com/?adaptiveRetries=true", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "adaptiveRetries": true - } - }, - { - "description": "adaptiveRetries=false is parsed correctly", - "uri": "mongodb://example.com/?adaptiveRetries=false", - "valid": true, - "warning": false, - "hosts": null, - "auth": null, - "options": { - "adaptiveRetries": false - } - }, - { - "description": "adaptiveRetries with invalid value causes a warning", - "uri": "mongodb://example.com/?adaptiveRetries=invalid", - "valid": true, - "warning": true, - "hosts": null, - "auth": null, - "options": null - } - ] -}