From 358e757ab5759e7a1d99e513896c02c1d7a37403 Mon Sep 17 00:00:00 2001 From: Cloud User Date: Mon, 1 Dec 2025 16:02:17 +0000 Subject: [PATCH 1/3] resyncing specs 12-01-2025 --- .../pool-create-min-size-error.json | 2 +- .../backpressure-network-error-fail.json | 140 +++++++++++++++++ .../backpressure-network-timeout-fail.json | 143 ++++++++++++++++++ ...ged-on-min-pool-size-population-error.json | 106 +++++++++++++ test/load_balancer/sdam-error-handling.json | 4 +- 5 files changed, 392 insertions(+), 3 deletions(-) create mode 100644 test/discovery_and_monitoring/unified/backpressure-network-error-fail.json create mode 100644 test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json create mode 100644 test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json diff --git a/test/connection_monitoring/pool-create-min-size-error.json b/test/connection_monitoring/pool-create-min-size-error.json index 1c744b850c..5c8ad02dbd 100644 --- a/test/connection_monitoring/pool-create-min-size-error.json +++ b/test/connection_monitoring/pool-create-min-size-error.json @@ -17,7 +17,7 @@ "isMaster", "hello" ], - "closeConnection": true, + "errorCode": 91, "appName": "poolCreateMinSizeErrorTest" } }, diff --git a/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json b/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json new file mode 100644 index 0000000000..f41b76459c --- /dev/null +++ b/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json @@ -0,0 +1,140 @@ +{ + "description": "backpressure-network-error-fail", + "schemaVersion": "1.17", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "serverless": "forbid", + "topologies": [ + "single", + "replicaset", + "sharded" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "setupClient", + "useMultipleMongoses": false + } + } + ], + "initialData": [ + { + "collectionName": "backpressure-network-error-fail", + "databaseName": "sdam-tests", + "documents": [ + { + "_id": 1 + }, + { + "_id": 2 + } + ] + } + ], + "tests": [ + { + "description": "apply backpressure on network connection errors during connection establishment", + "operations": [ + { + "name": "createEntities", + "object": "testRunner", + "arguments": { + "entities": [ + { + "client": { + "id": "client", + "useMultipleMongoses": false, + "observeEvents": [ + "serverHeartbeatSucceededEvent", + "poolClearedEvent" + ], + "uriOptions": { + "retryWrites": false, + "heartbeatFrequencyMS": 1000000, + "serverMonitoringMode": "poll", + "appname": "backpressureNetworkErrorFailTest" + } + } + }, + { + "database": { + "id": "database", + "client": "client", + "databaseName": "sdam-tests" + } + }, + { + "collection": { + "id": "collection", + "database": "database", + "collectionName": "backpressure-network-error-fail" + } + } + ] + } + }, + { + "name": "waitForEvent", + "object": "testRunner", + "arguments": { + "client": "client", + "event": { + "serverHeartbeatSucceededEvent": {} + }, + "count": 1 + } + }, + { + "name": "failPoint", + "object": "testRunner", + "arguments": { + "client": "setupClient", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": "alwaysOn", + "data": { + "failCommands": [ + "isMaster", + "hello" + ], + "appName": "backpressureNetworkErrorFailTest", + "closeConnection": true + } + } + } + }, + { + "name": "insertMany", + "object": "collection", + "arguments": { + "documents": [ + { + "_id": 3 + }, + { + "_id": 4 + } + ] + }, + "expectError": { + "isError": true, + "errorLabelsContain": [ + "SystemOverloadedError", + "RetryableError" + ] + } + } + ], + "expectEvents": [ + { + "client": "client", + "eventType": "cmap", + "events": [] + } + ] + } + ] +} diff --git a/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json b/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json new file mode 100644 index 0000000000..a97c7a329f --- /dev/null +++ b/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json @@ -0,0 +1,143 @@ +{ + "description": "backpressure-network-timeout-error", + "schemaVersion": "1.17", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "serverless": "forbid", + "topologies": [ + "single", + "replicaset", + "sharded" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "setupClient", + "useMultipleMongoses": false + } + } + ], + "initialData": [ + { + "collectionName": "backpressure-network-timeout-error", + "databaseName": "sdam-tests", + "documents": [ + { + "_id": 1 + }, + { + "_id": 2 + } + ] + } + ], + "tests": [ + { + "description": "apply backpressure on network timeout error during connection establishment", + "operations": [ + { + "name": "createEntities", + "object": "testRunner", + "arguments": { + "entities": [ + { + "client": { + "id": "client", + "useMultipleMongoses": false, + "observeEvents": [ + "serverDescriptionChangedEvent", + "poolClearedEvent" + ], + "uriOptions": { + "retryWrites": false, + "heartbeatFrequencyMS": 1000000, + "appname": "backpressureNetworkTimeoutErrorTest", + "serverMonitoringMode": "poll", + "connectTimeoutMS": 250, + "socketTimeoutMS": 250 + } + } + }, + { + "database": { + "id": "database", + "client": "client", + "databaseName": "sdam-tests" + } + }, + { + "collection": { + "id": "collection", + "database": "database", + "collectionName": "backpressure-network-timeout-error" + } + } + ] + } + }, + { + "name": "waitForEvent", + "object": "testRunner", + "arguments": { + "client": "client", + "event": { + "serverDescriptionChangedEvent": {} + }, + "count": 1 + } + }, + { + "name": "failPoint", + "object": "testRunner", + "arguments": { + "client": "setupClient", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": "alwaysOn", + "data": { + "failCommands": [ + "isMaster", + "hello" + ], + "blockConnection": true, + "blockTimeMS": 500, + "appName": "backpressureNetworkTimeoutErrorTest" + } + } + } + }, + { + "name": "insertMany", + "object": "collection", + "arguments": { + "documents": [ + { + "_id": 3 + }, + { + "_id": 4 + } + ] + }, + "expectError": { + "isError": true, + "errorLabelsContain": [ + "SystemOverloadedError", + "RetryableError" + ] + } + } + ], + "expectEvents": [ + { + "client": "client", + "eventType": "cmap", + "events": [] + } + ] + } + ] +} diff --git a/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json b/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json new file mode 100644 index 0000000000..35a49c1323 --- /dev/null +++ b/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json @@ -0,0 +1,106 @@ +{ + "description": "backpressure-server-description-unchanged-on-min-pool-size-population-error", + "schemaVersion": "1.17", + "runOnRequirements": [ + { + "minServerVersion": "4.4", + "serverless": "forbid", + "topologies": [ + "single" + ] + } + ], + "createEntities": [ + { + "client": { + "id": "setupClient", + "useMultipleMongoses": false + } + } + ], + "tests": [ + { + "description": "the server description is not changed on handshake error during minPoolSize population", + "operations": [ + { + "name": "createEntities", + "object": "testRunner", + "arguments": { + "entities": [ + { + "client": { + "id": "client", + "observeEvents": [ + "serverDescriptionChangedEvent", + "connectionClosedEvent" + ], + "uriOptions": { + "appname": "authErrorTest", + "minPoolSize": 5, + "maxConnecting": 1, + "serverMonitoringMode": "poll", + "heartbeatFrequencyMS": 1000000 + } + } + } + ] + } + }, + { + "name": "failPoint", + "object": "testRunner", + "arguments": { + "client": "setupClient", + "failPoint": { + "configureFailPoint": "failCommand", + "mode": { + "skip": 1 + }, + "data": { + "failCommands": [ + "hello", + "isMaster" + ], + "appName": "authErrorTest", + "closeConnection": true + } + } + } + }, + { + "name": "waitForEvent", + "object": "testRunner", + "arguments": { + "client": "client", + "event": { + "serverDescriptionChangedEvent": {} + }, + "count": 1 + } + }, + { + "name": "waitForEvent", + "object": "testRunner", + "arguments": { + "client": "client", + "event": { + "connectionClosedEvent": {} + }, + "count": 1 + } + } + ], + "expectEvents": [ + { + "client": "client", + "eventType": "sdam", + "events": [ + { + "serverDescriptionChangedEvent": {} + } + ] + } + ] + } + ] +} diff --git a/test/load_balancer/sdam-error-handling.json b/test/load_balancer/sdam-error-handling.json index 5892dcacd6..41bc90be7f 100644 --- a/test/load_balancer/sdam-error-handling.json +++ b/test/load_balancer/sdam-error-handling.json @@ -282,7 +282,7 @@ "isMaster", "hello" ], - "closeConnection": true, + "errorCode": 11600, "appName": "lbSDAMErrorTestClient" } } @@ -297,7 +297,7 @@ } }, "expectError": { - "isClientError": true + "isError": true } } ], From 8693c58f8b0ea973899e7ff29c63b289ae48c38b Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Fri, 5 Dec 2025 13:31:03 -0500 Subject: [PATCH 2/3] Add patch --- .evergreen/spec-patch/PYTHON-5517.patch | 442 ++++++++++++++++++++++++ 1 file changed, 442 insertions(+) create mode 100644 .evergreen/spec-patch/PYTHON-5517.patch diff --git a/.evergreen/spec-patch/PYTHON-5517.patch b/.evergreen/spec-patch/PYTHON-5517.patch new file mode 100644 index 0000000000..daea08de8e --- /dev/null +++ b/.evergreen/spec-patch/PYTHON-5517.patch @@ -0,0 +1,442 @@ +diff --git a/test/connection_monitoring/pool-create-min-size-error.json b/test/connection_monitoring/pool-create-min-size-error.json +index 1c744b85..5c8ad02d 100644 +--- a/test/connection_monitoring/pool-create-min-size-error.json ++++ b/test/connection_monitoring/pool-create-min-size-error.json +@@ -17,7 +17,7 @@ + "isMaster", + "hello" + ], +- "closeConnection": true, ++ "errorCode": 91, + "appName": "poolCreateMinSizeErrorTest" + } + }, +diff --git a/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json b/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json +new file mode 100644 +index 00000000..f41b7645 +--- /dev/null ++++ b/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json +@@ -0,0 +1,140 @@ ++{ ++ "description": "backpressure-network-error-fail", ++ "schemaVersion": "1.17", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "serverless": "forbid", ++ "topologies": [ ++ "single", ++ "replicaset", ++ "sharded" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "setupClient", ++ "useMultipleMongoses": false ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "collectionName": "backpressure-network-error-fail", ++ "databaseName": "sdam-tests", ++ "documents": [ ++ { ++ "_id": 1 ++ }, ++ { ++ "_id": 2 ++ } ++ ] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "apply backpressure on network connection errors during connection establishment", ++ "operations": [ ++ { ++ "name": "createEntities", ++ "object": "testRunner", ++ "arguments": { ++ "entities": [ ++ { ++ "client": { ++ "id": "client", ++ "useMultipleMongoses": false, ++ "observeEvents": [ ++ "serverHeartbeatSucceededEvent", ++ "poolClearedEvent" ++ ], ++ "uriOptions": { ++ "retryWrites": false, ++ "heartbeatFrequencyMS": 1000000, ++ "serverMonitoringMode": "poll", ++ "appname": "backpressureNetworkErrorFailTest" ++ } ++ } ++ }, ++ { ++ "database": { ++ "id": "database", ++ "client": "client", ++ "databaseName": "sdam-tests" ++ } ++ }, ++ { ++ "collection": { ++ "id": "collection", ++ "database": "database", ++ "collectionName": "backpressure-network-error-fail" ++ } ++ } ++ ] ++ } ++ }, ++ { ++ "name": "waitForEvent", ++ "object": "testRunner", ++ "arguments": { ++ "client": "client", ++ "event": { ++ "serverHeartbeatSucceededEvent": {} ++ }, ++ "count": 1 ++ } ++ }, ++ { ++ "name": "failPoint", ++ "object": "testRunner", ++ "arguments": { ++ "client": "setupClient", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": "alwaysOn", ++ "data": { ++ "failCommands": [ ++ "isMaster", ++ "hello" ++ ], ++ "appName": "backpressureNetworkErrorFailTest", ++ "closeConnection": true ++ } ++ } ++ } ++ }, ++ { ++ "name": "insertMany", ++ "object": "collection", ++ "arguments": { ++ "documents": [ ++ { ++ "_id": 3 ++ }, ++ { ++ "_id": 4 ++ } ++ ] ++ }, ++ "expectError": { ++ "isError": true, ++ "errorLabelsContain": [ ++ "SystemOverloadedError", ++ "RetryableError" ++ ] ++ } ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client", ++ "eventType": "cmap", ++ "events": [] ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json b/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json +new file mode 100644 +index 00000000..a97c7a32 +--- /dev/null ++++ b/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json +@@ -0,0 +1,143 @@ ++{ ++ "description": "backpressure-network-timeout-error", ++ "schemaVersion": "1.17", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "serverless": "forbid", ++ "topologies": [ ++ "single", ++ "replicaset", ++ "sharded" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "setupClient", ++ "useMultipleMongoses": false ++ } ++ } ++ ], ++ "initialData": [ ++ { ++ "collectionName": "backpressure-network-timeout-error", ++ "databaseName": "sdam-tests", ++ "documents": [ ++ { ++ "_id": 1 ++ }, ++ { ++ "_id": 2 ++ } ++ ] ++ } ++ ], ++ "tests": [ ++ { ++ "description": "apply backpressure on network timeout error during connection establishment", ++ "operations": [ ++ { ++ "name": "createEntities", ++ "object": "testRunner", ++ "arguments": { ++ "entities": [ ++ { ++ "client": { ++ "id": "client", ++ "useMultipleMongoses": false, ++ "observeEvents": [ ++ "serverDescriptionChangedEvent", ++ "poolClearedEvent" ++ ], ++ "uriOptions": { ++ "retryWrites": false, ++ "heartbeatFrequencyMS": 1000000, ++ "appname": "backpressureNetworkTimeoutErrorTest", ++ "serverMonitoringMode": "poll", ++ "connectTimeoutMS": 250, ++ "socketTimeoutMS": 250 ++ } ++ } ++ }, ++ { ++ "database": { ++ "id": "database", ++ "client": "client", ++ "databaseName": "sdam-tests" ++ } ++ }, ++ { ++ "collection": { ++ "id": "collection", ++ "database": "database", ++ "collectionName": "backpressure-network-timeout-error" ++ } ++ } ++ ] ++ } ++ }, ++ { ++ "name": "waitForEvent", ++ "object": "testRunner", ++ "arguments": { ++ "client": "client", ++ "event": { ++ "serverDescriptionChangedEvent": {} ++ }, ++ "count": 1 ++ } ++ }, ++ { ++ "name": "failPoint", ++ "object": "testRunner", ++ "arguments": { ++ "client": "setupClient", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": "alwaysOn", ++ "data": { ++ "failCommands": [ ++ "isMaster", ++ "hello" ++ ], ++ "blockConnection": true, ++ "blockTimeMS": 500, ++ "appName": "backpressureNetworkTimeoutErrorTest" ++ } ++ } ++ } ++ }, ++ { ++ "name": "insertMany", ++ "object": "collection", ++ "arguments": { ++ "documents": [ ++ { ++ "_id": 3 ++ }, ++ { ++ "_id": 4 ++ } ++ ] ++ }, ++ "expectError": { ++ "isError": true, ++ "errorLabelsContain": [ ++ "SystemOverloadedError", ++ "RetryableError" ++ ] ++ } ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client", ++ "eventType": "cmap", ++ "events": [] ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json b/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json +new file mode 100644 +index 00000000..35a49c13 +--- /dev/null ++++ b/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json +@@ -0,0 +1,106 @@ ++{ ++ "description": "backpressure-server-description-unchanged-on-min-pool-size-population-error", ++ "schemaVersion": "1.17", ++ "runOnRequirements": [ ++ { ++ "minServerVersion": "4.4", ++ "serverless": "forbid", ++ "topologies": [ ++ "single" ++ ] ++ } ++ ], ++ "createEntities": [ ++ { ++ "client": { ++ "id": "setupClient", ++ "useMultipleMongoses": false ++ } ++ } ++ ], ++ "tests": [ ++ { ++ "description": "the server description is not changed on handshake error during minPoolSize population", ++ "operations": [ ++ { ++ "name": "createEntities", ++ "object": "testRunner", ++ "arguments": { ++ "entities": [ ++ { ++ "client": { ++ "id": "client", ++ "observeEvents": [ ++ "serverDescriptionChangedEvent", ++ "connectionClosedEvent" ++ ], ++ "uriOptions": { ++ "appname": "authErrorTest", ++ "minPoolSize": 5, ++ "maxConnecting": 1, ++ "serverMonitoringMode": "poll", ++ "heartbeatFrequencyMS": 1000000 ++ } ++ } ++ } ++ ] ++ } ++ }, ++ { ++ "name": "failPoint", ++ "object": "testRunner", ++ "arguments": { ++ "client": "setupClient", ++ "failPoint": { ++ "configureFailPoint": "failCommand", ++ "mode": { ++ "skip": 1 ++ }, ++ "data": { ++ "failCommands": [ ++ "hello", ++ "isMaster" ++ ], ++ "appName": "authErrorTest", ++ "closeConnection": true ++ } ++ } ++ } ++ }, ++ { ++ "name": "waitForEvent", ++ "object": "testRunner", ++ "arguments": { ++ "client": "client", ++ "event": { ++ "serverDescriptionChangedEvent": {} ++ }, ++ "count": 1 ++ } ++ }, ++ { ++ "name": "waitForEvent", ++ "object": "testRunner", ++ "arguments": { ++ "client": "client", ++ "event": { ++ "connectionClosedEvent": {} ++ }, ++ "count": 1 ++ } ++ } ++ ], ++ "expectEvents": [ ++ { ++ "client": "client", ++ "eventType": "sdam", ++ "events": [ ++ { ++ "serverDescriptionChangedEvent": {} ++ } ++ ] ++ } ++ ] ++ } ++ ] ++} +diff --git a/test/load_balancer/sdam-error-handling.json b/test/load_balancer/sdam-error-handling.json +index 5892dcac..41bc90be 100644 +--- a/test/load_balancer/sdam-error-handling.json ++++ b/test/load_balancer/sdam-error-handling.json +@@ -282,7 +282,7 @@ + "isMaster", + "hello" + ], +- "closeConnection": true, ++ "errorCode": 11600, + "appName": "lbSDAMErrorTestClient" + } + } +@@ -297,7 +297,7 @@ + } + }, + "expectError": { +- "isClientError": true ++ "isError": true + } + } + ], From 0f43f04d10ca0b33e1923b3fee4304231ddc6e66 Mon Sep 17 00:00:00 2001 From: "Jeffrey A. Clark" Date: Fri, 5 Dec 2025 14:05:21 -0500 Subject: [PATCH 3/3] Resync --- .../pool-create-min-size-error.json | 2 +- .../errors/error_handling_handshake.json | 16 +- .../backpressure-network-error-fail.json | 140 ----------------- .../backpressure-network-timeout-fail.json | 143 ------------------ ...ged-on-min-pool-size-population-error.json | 106 ------------- test/load_balancer/sdam-error-handling.json | 4 +- 6 files changed, 15 insertions(+), 396 deletions(-) delete mode 100644 test/discovery_and_monitoring/unified/backpressure-network-error-fail.json delete mode 100644 test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json delete mode 100644 test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json diff --git a/test/connection_monitoring/pool-create-min-size-error.json b/test/connection_monitoring/pool-create-min-size-error.json index 5c8ad02dbd..1c744b850c 100644 --- a/test/connection_monitoring/pool-create-min-size-error.json +++ b/test/connection_monitoring/pool-create-min-size-error.json @@ -17,7 +17,7 @@ "isMaster", "hello" ], - "errorCode": 91, + "closeConnection": true, "appName": "poolCreateMinSizeErrorTest" } }, diff --git a/test/discovery_and_monitoring/errors/error_handling_handshake.json b/test/discovery_and_monitoring/errors/error_handling_handshake.json index 56ca7d1132..bf83f46f6a 100644 --- a/test/discovery_and_monitoring/errors/error_handling_handshake.json +++ b/test/discovery_and_monitoring/errors/error_handling_handshake.json @@ -97,14 +97,22 @@ "outcome": { "servers": { "a:27017": { - "type": "Unknown", - "topologyVersion": null, + "type": "RSPrimary", + "setName": "rs", + "topologyVersion": { + "processId": { + "$oid": "000000000000000000000001" + }, + "counter": { + "$numberLong": "1" + } + }, "pool": { - "generation": 1 + "generation": 0 } } }, - "topologyType": "ReplicaSetNoPrimary", + "topologyType": "ReplicaSetWithPrimary", "logicalSessionTimeoutMinutes": null, "setName": "rs" } diff --git a/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json b/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json deleted file mode 100644 index f41b76459c..0000000000 --- a/test/discovery_and_monitoring/unified/backpressure-network-error-fail.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "description": "backpressure-network-error-fail", - "schemaVersion": "1.17", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "backpressure-network-error-fail", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "apply backpressure on network connection errors during connection establishment", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "serverHeartbeatSucceededEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 1000000, - "serverMonitoringMode": "poll", - "appname": "backpressureNetworkErrorFailTest" - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "backpressure-network-error-fail" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverHeartbeatSucceededEvent": {} - }, - "count": 1 - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "appName": "backpressureNetworkErrorFailTest", - "closeConnection": true - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true, - "errorLabelsContain": [ - "SystemOverloadedError", - "RetryableError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "cmap", - "events": [] - } - ] - } - ] -} diff --git a/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json b/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json deleted file mode 100644 index a97c7a329f..0000000000 --- a/test/discovery_and_monitoring/unified/backpressure-network-timeout-fail.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "description": "backpressure-network-timeout-error", - "schemaVersion": "1.17", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single", - "replicaset", - "sharded" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "initialData": [ - { - "collectionName": "backpressure-network-timeout-error", - "databaseName": "sdam-tests", - "documents": [ - { - "_id": 1 - }, - { - "_id": 2 - } - ] - } - ], - "tests": [ - { - "description": "apply backpressure on network timeout error during connection establishment", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "useMultipleMongoses": false, - "observeEvents": [ - "serverDescriptionChangedEvent", - "poolClearedEvent" - ], - "uriOptions": { - "retryWrites": false, - "heartbeatFrequencyMS": 1000000, - "appname": "backpressureNetworkTimeoutErrorTest", - "serverMonitoringMode": "poll", - "connectTimeoutMS": 250, - "socketTimeoutMS": 250 - } - } - }, - { - "database": { - "id": "database", - "client": "client", - "databaseName": "sdam-tests" - } - }, - { - "collection": { - "id": "collection", - "database": "database", - "collectionName": "backpressure-network-timeout-error" - } - } - ] - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": {} - }, - "count": 1 - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": "alwaysOn", - "data": { - "failCommands": [ - "isMaster", - "hello" - ], - "blockConnection": true, - "blockTimeMS": 500, - "appName": "backpressureNetworkTimeoutErrorTest" - } - } - } - }, - { - "name": "insertMany", - "object": "collection", - "arguments": { - "documents": [ - { - "_id": 3 - }, - { - "_id": 4 - } - ] - }, - "expectError": { - "isError": true, - "errorLabelsContain": [ - "SystemOverloadedError", - "RetryableError" - ] - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "cmap", - "events": [] - } - ] - } - ] -} diff --git a/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json b/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json deleted file mode 100644 index 35a49c1323..0000000000 --- a/test/discovery_and_monitoring/unified/backpressure-server-description-unchanged-on-min-pool-size-population-error.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "description": "backpressure-server-description-unchanged-on-min-pool-size-population-error", - "schemaVersion": "1.17", - "runOnRequirements": [ - { - "minServerVersion": "4.4", - "serverless": "forbid", - "topologies": [ - "single" - ] - } - ], - "createEntities": [ - { - "client": { - "id": "setupClient", - "useMultipleMongoses": false - } - } - ], - "tests": [ - { - "description": "the server description is not changed on handshake error during minPoolSize population", - "operations": [ - { - "name": "createEntities", - "object": "testRunner", - "arguments": { - "entities": [ - { - "client": { - "id": "client", - "observeEvents": [ - "serverDescriptionChangedEvent", - "connectionClosedEvent" - ], - "uriOptions": { - "appname": "authErrorTest", - "minPoolSize": 5, - "maxConnecting": 1, - "serverMonitoringMode": "poll", - "heartbeatFrequencyMS": 1000000 - } - } - } - ] - } - }, - { - "name": "failPoint", - "object": "testRunner", - "arguments": { - "client": "setupClient", - "failPoint": { - "configureFailPoint": "failCommand", - "mode": { - "skip": 1 - }, - "data": { - "failCommands": [ - "hello", - "isMaster" - ], - "appName": "authErrorTest", - "closeConnection": true - } - } - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "serverDescriptionChangedEvent": {} - }, - "count": 1 - } - }, - { - "name": "waitForEvent", - "object": "testRunner", - "arguments": { - "client": "client", - "event": { - "connectionClosedEvent": {} - }, - "count": 1 - } - } - ], - "expectEvents": [ - { - "client": "client", - "eventType": "sdam", - "events": [ - { - "serverDescriptionChangedEvent": {} - } - ] - } - ] - } - ] -} diff --git a/test/load_balancer/sdam-error-handling.json b/test/load_balancer/sdam-error-handling.json index 41bc90be7f..5892dcacd6 100644 --- a/test/load_balancer/sdam-error-handling.json +++ b/test/load_balancer/sdam-error-handling.json @@ -282,7 +282,7 @@ "isMaster", "hello" ], - "errorCode": 11600, + "closeConnection": true, "appName": "lbSDAMErrorTestClient" } } @@ -297,7 +297,7 @@ } }, "expectError": { - "isError": true + "isClientError": true } } ],