Compare commits

...

7 Commits

Author SHA1 Message Date
Iris
b28f3c307f
Merge branch 'master' into spec-resync-12-01-2025 2025-12-10 10:25:06 -08:00
Iris Ho
9fd960e5ad
undo these changes cuz they're in PYTHON-5517 2025-12-10 10:19:24 -08:00
Iris Ho
bab25a42b0
fix formatting in contributing! 2025-12-10 10:04:08 -08:00
Iris Ho
6a22ee2861
i think this is part of PYTHON-5517 too! 2025-12-10 10:03:49 -08:00
Jeffrey A. Clark
0f43f04d10 Resync 2025-12-05 14:05:21 -05:00
Jeffrey A. Clark
8693c58f8b Add patch 2025-12-05 13:31:03 -05:00
Cloud User
358e757ab5 resyncing specs 12-01-2025 2025-12-01 16:02:17 +00:00
2 changed files with 474 additions and 0 deletions

View File

@ -0,0 +1,473 @@
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
}
}
],
diff --git a/test/discovery_and_monitoring/errors/error_handling_handshake.json b/test/discovery_and_monitoring/errors/error_handling_handshake.json
index 56ca7d11..bf83f46f 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"
}

View File

@ -487,6 +487,7 @@ results into the patch file.
For example: the imaginary, unimplemented PYTHON-1234 ticket has associated spec test changes. To add those changes to `PYTHON-1234.patch`), do the following:
```bash
git diff HEAD~1 path/to/file >> .evergreen/spec-patch/PYTHON-1234.patch
```
#### Running Locally
Both `resync-all-specs.sh` and `resync-all-specs.py` can be run locally (and won't generate a PR).