From 0a578b44520ae72724a7cc9ceb89b9b6bdafc663 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Thu, 8 Aug 2024 11:26:25 -0700 Subject: [PATCH] PYTHON-4396 Unskip failCommand+appName tests on MongoDB 4.4.7+ (#1735) --- test/__init__.py | 4 +- test/asynchronous/__init__.py | 4 +- test/csot/change-streams.json | 22 +++---- test/csot/close-cursors.json | 12 ++-- test/csot/command-execution.json | 5 +- test/csot/convenient-transactions.json | 24 +++++++- test/csot/deprecated-options.json | 2 +- test/csot/error-transformations.json | 1 - test/csot/global-timeoutMS.json | 2 +- test/csot/legacy-timeouts.json | 4 +- test/csot/non-tailable-cursors.json | 20 +++---- test/csot/override-operation-timeoutMS.json | 2 +- test/csot/retryability-legacy-timeouts.json | 2 +- test/csot/sessions-inherit-timeoutMS.json | 30 ++++++++-- ...sessions-override-operation-timeoutMS.json | 34 ++++++++--- test/csot/sessions-override-timeoutMS.json | 30 ++++++++-- test/csot/tailable-awaitData.json | 14 ++--- test/csot/tailable-non-awaitData.json | 10 ++-- .../unified/hello-command-error.json | 2 +- .../unified/hello-network-error.json | 2 +- .../unified/interruptInUse-pool-clear.json | 2 +- .../unified/minPoolSize-error.json | 2 +- test/load_balancer/cursors.json | 57 +++++++++++++++---- test/load_balancer/sdam-error-handling.json | 5 +- test/load_balancer/transactions.json | 2 +- test/test_pooling.py | 9 +-- test/test_streaming_protocol.py | 1 - 27 files changed, 204 insertions(+), 100 deletions(-) diff --git a/test/__init__.py b/test/__init__.py index b603ae0a5..b8394bd13 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -728,9 +728,9 @@ class ClientContext: def require_failCommand_appName(self, func): """Run a test only if the server supports the failCommand appName.""" - # SERVER-47195 + # SERVER-47195 and SERVER-49336. return self._require( - lambda: (self.test_commands_enabled and self.version >= (4, 4, -1)), + lambda: (self.test_commands_enabled and self.version >= (4, 4, 7)), "failCommand appName must be supported", func=func, ) diff --git a/test/asynchronous/__init__.py b/test/asynchronous/__init__.py index 878ef81ba..4098d9af8 100644 --- a/test/asynchronous/__init__.py +++ b/test/asynchronous/__init__.py @@ -730,9 +730,9 @@ class AsyncClientContext: def require_failCommand_appName(self, func): """Run a test only if the server supports the failCommand appName.""" - # SERVER-47195 + # SERVER-47195 and SERVER-49336. return self._require( - lambda: (self.test_commands_enabled and self.version >= (4, 4, -1)), + lambda: (self.test_commands_enabled and self.version >= (4, 4, 7)), "failCommand appName must be supported", func=func, ) diff --git a/test/csot/change-streams.json b/test/csot/change-streams.json index a8b2b7e17..8cffb08e2 100644 --- a/test/csot/change-streams.json +++ b/test/csot/change-streams.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], @@ -104,7 +104,7 @@ "aggregate" ], "blockConnection": true, - "blockTimeMS": 55 + "blockTimeMS": 250 } } } @@ -114,7 +114,7 @@ "object": "collection", "arguments": { "pipeline": [], - "timeoutMS": 50 + "timeoutMS": 200 }, "expectError": { "isTimeoutError": true @@ -242,7 +242,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 150 } } } @@ -252,7 +252,7 @@ "object": "collection", "arguments": { "pipeline": [], - "timeoutMS": 20, + "timeoutMS": 200, "batchSize": 2, "maxAwaitTimeMS": 1 }, @@ -310,7 +310,7 @@ "object": "collection", "arguments": { "pipeline": [], - "timeoutMS": 20 + "timeoutMS": 200 }, "saveResultAsEntity": "changeStream" }, @@ -330,7 +330,7 @@ "aggregate" ], "blockConnection": true, - "blockTimeMS": 12, + "blockTimeMS": 120, "errorCode": 7, "errorLabels": [ "ResumableChangeStreamError" @@ -412,7 +412,7 @@ "arguments": { "pipeline": [], "maxAwaitTimeMS": 1, - "timeoutMS": 100 + "timeoutMS": 200 }, "saveResultAsEntity": "changeStream" }, @@ -431,7 +431,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 150 + "blockTimeMS": 250 } } } @@ -534,7 +534,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } @@ -544,7 +544,7 @@ "object": "collection", "arguments": { "pipeline": [], - "timeoutMS": 10 + "timeoutMS": 200 }, "saveResultAsEntity": "changeStream" }, diff --git a/test/csot/close-cursors.json b/test/csot/close-cursors.json index 1361971c4..79b0de7b6 100644 --- a/test/csot/close-cursors.json +++ b/test/csot/close-cursors.json @@ -75,7 +75,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 50 + "blockTimeMS": 250 } } } @@ -86,7 +86,7 @@ "arguments": { "filter": {}, "batchSize": 2, - "timeoutMS": 20 + "timeoutMS": 200 }, "saveResultAsEntity": "cursor" }, @@ -175,7 +175,7 @@ "killCursors" ], "blockConnection": true, - "blockTimeMS": 30 + "blockTimeMS": 250 } } } @@ -186,7 +186,7 @@ "arguments": { "filter": {}, "batchSize": 2, - "timeoutMS": 20 + "timeoutMS": 200 }, "saveResultAsEntity": "cursor" }, @@ -194,7 +194,7 @@ "name": "close", "object": "cursor", "arguments": { - "timeoutMS": 40 + "timeoutMS": 400 } } ], @@ -215,7 +215,7 @@ { "commandStartedEvent": { "command": { - "killCursors": "collection", + "killCursors": "coll", "maxTimeMS": { "$$type": [ "int", diff --git a/test/csot/command-execution.json b/test/csot/command-execution.json index f0858791e..aa9c3eb23 100644 --- a/test/csot/command-execution.json +++ b/test/csot/command-execution.json @@ -3,11 +3,10 @@ "schemaVersion": "1.9", "runOnRequirements": [ { - "minServerVersion": "4.9", + "minServerVersion": "4.4.7", "topologies": [ "single", "replicaset", - "sharded-replicaset", "sharded" ], "serverless": "forbid" @@ -52,7 +51,7 @@ ], "appName": "reduceMaxTimeMSTest", "blockConnection": true, - "blockTimeMS": 75 + "blockTimeMS": 50 } } } diff --git a/test/csot/convenient-transactions.json b/test/csot/convenient-transactions.json index 0c8cc6edd..3868b3026 100644 --- a/test/csot/convenient-transactions.json +++ b/test/csot/convenient-transactions.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], @@ -21,7 +21,7 @@ "client": { "id": "client", "uriOptions": { - "timeoutMS": 50 + "timeoutMS": 500 }, "useMultipleMongoses": false, "observeEvents": [ @@ -81,6 +81,9 @@ } } ] + }, + "expectError": { + "isClientError": true } } ], @@ -109,7 +112,7 @@ "insert" ], "blockConnection": true, - "blockTimeMS": 30 + "blockTimeMS": 300 } } } @@ -182,6 +185,21 @@ } } } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction", + "databaseName": "admin", + "command": { + "abortTransaction": 1, + "maxTimeMS": { + "$$type": [ + "int", + "long" + ] + } + } + } } ] } diff --git a/test/csot/deprecated-options.json b/test/csot/deprecated-options.json index 9c9b9a228..d3e4631ff 100644 --- a/test/csot/deprecated-options.json +++ b/test/csot/deprecated-options.json @@ -6,7 +6,7 @@ "minServerVersion": "4.2", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], diff --git a/test/csot/error-transformations.json b/test/csot/error-transformations.json index 4d9e061c3..4889e3958 100644 --- a/test/csot/error-transformations.json +++ b/test/csot/error-transformations.json @@ -11,7 +11,6 @@ { "minServerVersion": "4.2", "topologies": [ - "replicaset", "sharded" ] } diff --git a/test/csot/global-timeoutMS.json b/test/csot/global-timeoutMS.json index 34854ac15..740bbad2e 100644 --- a/test/csot/global-timeoutMS.json +++ b/test/csot/global-timeoutMS.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], diff --git a/test/csot/legacy-timeouts.json b/test/csot/legacy-timeouts.json index 3a2d2eaef..535425c93 100644 --- a/test/csot/legacy-timeouts.json +++ b/test/csot/legacy-timeouts.json @@ -1,6 +1,6 @@ { "description": "legacy timeouts continue to work if timeoutMS is not set", - "schemaVersion": "1.9", + "schemaVersion": "1.0", "runOnRequirements": [ { "minServerVersion": "4.4" @@ -280,7 +280,7 @@ { "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], diff --git a/test/csot/non-tailable-cursors.json b/test/csot/non-tailable-cursors.json index 0a5448a6b..291c6e72a 100644 --- a/test/csot/non-tailable-cursors.json +++ b/test/csot/non-tailable-cursors.json @@ -17,7 +17,7 @@ "client": { "id": "client", "uriOptions": { - "timeoutMS": 10 + "timeoutMS": 200 }, "useMultipleMongoses": false, "observeEvents": [ @@ -84,7 +84,7 @@ "find" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } @@ -143,7 +143,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 125 } } } @@ -153,7 +153,7 @@ "object": "collection", "arguments": { "filter": {}, - "timeoutMS": 20, + "timeoutMS": 200, "batchSize": 2 }, "expectError": { @@ -221,7 +221,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 150 } } } @@ -232,7 +232,7 @@ "arguments": { "filter": {}, "timeoutMode": "cursorLifetime", - "timeoutMS": 20, + "timeoutMS": 200, "batchSize": 2 }, "expectError": { @@ -299,7 +299,7 @@ "find" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } @@ -355,7 +355,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 125 } } } @@ -366,7 +366,7 @@ "arguments": { "filter": {}, "timeoutMode": "iteration", - "timeoutMS": 20, + "timeoutMS": 200, "batchSize": 2 } } @@ -427,7 +427,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } diff --git a/test/csot/override-operation-timeoutMS.json b/test/csot/override-operation-timeoutMS.json index 896b996ee..6fa0bd802 100644 --- a/test/csot/override-operation-timeoutMS.json +++ b/test/csot/override-operation-timeoutMS.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], diff --git a/test/csot/retryability-legacy-timeouts.json b/test/csot/retryability-legacy-timeouts.json index 63e8efccf..aded781ae 100644 --- a/test/csot/retryability-legacy-timeouts.json +++ b/test/csot/retryability-legacy-timeouts.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], diff --git a/test/csot/sessions-inherit-timeoutMS.json b/test/csot/sessions-inherit-timeoutMS.json index 8205c086b..13ea91c79 100644 --- a/test/csot/sessions-inherit-timeoutMS.json +++ b/test/csot/sessions-inherit-timeoutMS.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], @@ -21,7 +21,7 @@ "client": { "id": "client", "uriOptions": { - "timeoutMS": 50 + "timeoutMS": 500 }, "useMultipleMongoses": false, "observeEvents": [ @@ -78,7 +78,7 @@ "commitTransaction" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -165,7 +165,7 @@ "abortTransaction" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -249,7 +249,7 @@ "insert" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -302,6 +302,26 @@ "commandFailedEvent": { "commandName": "insert" } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction", + "databaseName": "admin", + "command": { + "abortTransaction": 1, + "maxTimeMS": { + "$$type": [ + "int", + "long" + ] + } + } + } + }, + { + "commandFailedEvent": { + "commandName": "abortTransaction" + } } ] } diff --git a/test/csot/sessions-override-operation-timeoutMS.json b/test/csot/sessions-override-operation-timeoutMS.json index ff26de29f..441c69832 100644 --- a/test/csot/sessions-override-operation-timeoutMS.json +++ b/test/csot/sessions-override-operation-timeoutMS.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], @@ -75,7 +75,7 @@ "commitTransaction" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -98,7 +98,7 @@ "name": "commitTransaction", "object": "session", "arguments": { - "timeoutMS": 50 + "timeoutMS": 500 }, "expectError": { "isTimeoutError": true @@ -165,7 +165,7 @@ "abortTransaction" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -188,7 +188,7 @@ "name": "abortTransaction", "object": "session", "arguments": { - "timeoutMS": 50 + "timeoutMS": 500 } } ], @@ -252,7 +252,7 @@ "insert" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -261,7 +261,7 @@ "name": "withTransaction", "object": "session", "arguments": { - "timeoutMS": 50, + "timeoutMS": 500, "callback": [ { "name": "insertOne", @@ -306,6 +306,26 @@ "commandFailedEvent": { "commandName": "insert" } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction", + "databaseName": "admin", + "command": { + "abortTransaction": 1, + "maxTimeMS": { + "$$type": [ + "int", + "long" + ] + } + } + } + }, + { + "commandFailedEvent": { + "commandName": "abortTransaction" + } } ] } diff --git a/test/csot/sessions-override-timeoutMS.json b/test/csot/sessions-override-timeoutMS.json index 1d3b8932a..d90152e90 100644 --- a/test/csot/sessions-override-timeoutMS.json +++ b/test/csot/sessions-override-timeoutMS.json @@ -6,7 +6,7 @@ "minServerVersion": "4.4", "topologies": [ "replicaset", - "sharded-replicaset" + "sharded" ] } ], @@ -47,7 +47,7 @@ "id": "session", "client": "client", "sessionOptions": { - "defaultTimeoutMS": 50 + "defaultTimeoutMS": 500 } } } @@ -78,7 +78,7 @@ "commitTransaction" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -165,7 +165,7 @@ "abortTransaction" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -249,7 +249,7 @@ "insert" ], "blockConnection": true, - "blockTimeMS": 60 + "blockTimeMS": 600 } } } @@ -302,6 +302,26 @@ "commandFailedEvent": { "commandName": "insert" } + }, + { + "commandStartedEvent": { + "commandName": "abortTransaction", + "databaseName": "admin", + "command": { + "abortTransaction": 1, + "maxTimeMS": { + "$$type": [ + "int", + "long" + ] + } + } + } + }, + { + "commandFailedEvent": { + "commandName": "abortTransaction" + } } ] } diff --git a/test/csot/tailable-awaitData.json b/test/csot/tailable-awaitData.json index 6da85c778..535fb6924 100644 --- a/test/csot/tailable-awaitData.json +++ b/test/csot/tailable-awaitData.json @@ -17,7 +17,7 @@ "client": { "id": "client", "uriOptions": { - "timeoutMS": 10 + "timeoutMS": 200 }, "useMultipleMongoses": false, "observeEvents": [ @@ -130,7 +130,7 @@ "find" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 300 } } } @@ -188,7 +188,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 150 } } } @@ -199,7 +199,7 @@ "arguments": { "filter": {}, "cursorType": "tailableAwait", - "timeoutMS": 20, + "timeoutMS": 250, "batchSize": 1 }, "saveResultAsEntity": "tailableCursor" @@ -272,7 +272,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 150 } } } @@ -283,7 +283,7 @@ "arguments": { "filter": {}, "cursorType": "tailableAwait", - "timeoutMS": 20, + "timeoutMS": 250, "batchSize": 1, "maxAwaitTimeMS": 1 }, @@ -354,7 +354,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } diff --git a/test/csot/tailable-non-awaitData.json b/test/csot/tailable-non-awaitData.json index 34ee66096..e88230e4f 100644 --- a/test/csot/tailable-non-awaitData.json +++ b/test/csot/tailable-non-awaitData.json @@ -17,7 +17,7 @@ "client": { "id": "client", "uriOptions": { - "timeoutMS": 10 + "timeoutMS": 200 }, "useMultipleMongoses": false, "observeEvents": [ @@ -94,7 +94,7 @@ "find" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } @@ -154,7 +154,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 150 } } } @@ -165,7 +165,7 @@ "arguments": { "filter": {}, "cursorType": "tailable", - "timeoutMS": 20, + "timeoutMS": 200, "batchSize": 1 }, "saveResultAsEntity": "tailableCursor" @@ -239,7 +239,7 @@ "getMore" ], "blockConnection": true, - "blockTimeMS": 15 + "blockTimeMS": 250 } } } diff --git a/test/discovery_and_monitoring/unified/hello-command-error.json b/test/discovery_and_monitoring/unified/hello-command-error.json index 9afea87e7..87958cb2c 100644 --- a/test/discovery_and_monitoring/unified/hello-command-error.json +++ b/test/discovery_and_monitoring/unified/hello-command-error.json @@ -3,7 +3,7 @@ "schemaVersion": "1.4", "runOnRequirements": [ { - "minServerVersion": "4.9", + "minServerVersion": "4.4.7", "serverless": "forbid", "topologies": [ "single", diff --git a/test/discovery_and_monitoring/unified/hello-network-error.json b/test/discovery_and_monitoring/unified/hello-network-error.json index 55373c90c..15ed2b605 100644 --- a/test/discovery_and_monitoring/unified/hello-network-error.json +++ b/test/discovery_and_monitoring/unified/hello-network-error.json @@ -3,7 +3,7 @@ "schemaVersion": "1.4", "runOnRequirements": [ { - "minServerVersion": "4.9", + "minServerVersion": "4.4.7", "serverless": "forbid", "topologies": [ "single", diff --git a/test/discovery_and_monitoring/unified/interruptInUse-pool-clear.json b/test/discovery_and_monitoring/unified/interruptInUse-pool-clear.json index a20d79030..d9329646d 100644 --- a/test/discovery_and_monitoring/unified/interruptInUse-pool-clear.json +++ b/test/discovery_and_monitoring/unified/interruptInUse-pool-clear.json @@ -3,7 +3,7 @@ "schemaVersion": "1.11", "runOnRequirements": [ { - "minServerVersion": "4.9", + "minServerVersion": "4.4", "serverless": "forbid", "topologies": [ "replicaset", diff --git a/test/discovery_and_monitoring/unified/minPoolSize-error.json b/test/discovery_and_monitoring/unified/minPoolSize-error.json index 7e294baf6..bd9e9fcde 100644 --- a/test/discovery_and_monitoring/unified/minPoolSize-error.json +++ b/test/discovery_and_monitoring/unified/minPoolSize-error.json @@ -3,7 +3,7 @@ "schemaVersion": "1.4", "runOnRequirements": [ { - "minServerVersion": "4.9", + "minServerVersion": "4.4.7", "serverless": "forbid", "topologies": [ "single" diff --git a/test/load_balancer/cursors.json b/test/load_balancer/cursors.json index e66c46c0c..27aaddd5b 100644 --- a/test/load_balancer/cursors.json +++ b/test/load_balancer/cursors.json @@ -1,6 +1,6 @@ { "description": "cursors are correctly pinned to connections for load-balanced clusters", - "schemaVersion": "1.3", + "schemaVersion": "1.4", "runOnRequirements": [ { "topologies": [ @@ -222,7 +222,10 @@ "reply": { "cursor": { "id": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "firstBatch": { "$$type": "array" @@ -239,7 +242,10 @@ "commandStartedEvent": { "command": { "getMore": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "collection": "coll0" }, @@ -333,7 +339,10 @@ "reply": { "cursor": { "id": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "firstBatch": { "$$type": "array" @@ -475,7 +484,10 @@ "reply": { "cursor": { "id": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "firstBatch": { "$$type": "array" @@ -492,7 +504,10 @@ "commandStartedEvent": { "command": { "getMore": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "collection": "coll0" }, @@ -605,7 +620,10 @@ "reply": { "cursor": { "id": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "firstBatch": { "$$type": "array" @@ -750,7 +768,10 @@ "reply": { "cursor": { "id": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "firstBatch": { "$$type": "array" @@ -767,7 +788,10 @@ "commandStartedEvent": { "command": { "getMore": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "collection": "coll0" }, @@ -858,7 +882,10 @@ "commandStartedEvent": { "command": { "getMore": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "collection": "coll0" }, @@ -950,7 +977,10 @@ "commandStartedEvent": { "command": { "getMore": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "collection": { "$$type": "string" @@ -1100,7 +1130,10 @@ "commandStartedEvent": { "command": { "getMore": { - "$$type": "long" + "$$type": [ + "int", + "long" + ] }, "collection": "coll0" }, diff --git a/test/load_balancer/sdam-error-handling.json b/test/load_balancer/sdam-error-handling.json index 8760b723f..5892dcacd 100644 --- a/test/load_balancer/sdam-error-handling.json +++ b/test/load_balancer/sdam-error-handling.json @@ -1,6 +1,6 @@ { "description": "state change errors are correctly handled", - "schemaVersion": "1.3", + "schemaVersion": "1.4", "runOnRequirements": [ { "topologies": [ @@ -263,7 +263,7 @@ "description": "errors during the initial connection hello are ignored", "runOnRequirements": [ { - "minServerVersion": "4.9" + "minServerVersion": "4.4.7" } ], "operations": [ @@ -279,7 +279,6 @@ }, "data": { "failCommands": [ - "ismaster", "isMaster", "hello" ], diff --git a/test/load_balancer/transactions.json b/test/load_balancer/transactions.json index 8cf24f4ca..0dd04ee85 100644 --- a/test/load_balancer/transactions.json +++ b/test/load_balancer/transactions.json @@ -1,6 +1,6 @@ { "description": "transactions are correctly pinned to connections for load-balanced clusters", - "schemaVersion": "1.3", + "schemaVersion": "1.4", "runOnRequirements": [ { "topologies": [ diff --git a/test/test_pooling.py b/test/test_pooling.py index cd8a61735..31259d7b3 100644 --- a/test/test_pooling.py +++ b/test/test_pooling.py @@ -413,7 +413,7 @@ class TestPooling(_TestPoolingBase): # maxConnecting = unbounded: 30+ connections in ~0.140+ seconds print(len(pool.conns)) - @client_context.require_failCommand_fail_point + @client_context.require_failCommand_appName def test_csot_timeout_message(self): client = rs_or_single_client(appName="connectionTimeoutApp") self.addCleanup(client.close) @@ -438,7 +438,7 @@ class TestPooling(_TestPoolingBase): self.assertTrue("(configured timeouts: timeoutMS: 500.0ms" in str(error.exception)) - @client_context.require_failCommand_fail_point + @client_context.require_failCommand_appName def test_socket_timeout_message(self): client = rs_or_single_client(socketTimeoutMS=500, appName="connectionTimeoutApp") self.addCleanup(client.close) @@ -465,10 +465,7 @@ class TestPooling(_TestPoolingBase): in str(error.exception) ) - @client_context.require_failCommand_fail_point - @client_context.require_version_min( - 4, 9, 0 - ) # configureFailPoint does not allow failure on handshake before 4.9, fixed in SERVER-49336 + @client_context.require_failCommand_appName def test_connection_timeout_message(self): # Mock a connection creation failing due to timeout. mock_connection_timeout = { diff --git a/test/test_streaming_protocol.py b/test/test_streaming_protocol.py index 44e673822..9bca899a4 100644 --- a/test/test_streaming_protocol.py +++ b/test/test_streaming_protocol.py @@ -141,7 +141,6 @@ class TestStreamingProtocol(IntegrationTest): self.assertEqual(1, len(events)) self.assertGreater(events[0].new_description.round_trip_time, 0) - @client_context.require_version_min(4, 9, -1) @client_context.require_failCommand_appName def test_monitor_waits_after_server_check_error(self): # This test implements: