From 594dacaaf969904ba938bd29b28e40579d418673 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 20 May 2024 10:07:30 -0400 Subject: [PATCH 1/2] MOTOR-1315 Fix handling of explicitly skipped tests (#1642) --- test/unified_format.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unified_format.py b/test/unified_format.py index 96011dd0a..cf4e3a878 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -1121,6 +1121,8 @@ class UnifiedSpecTestMixinV1(IntegrationTest): self.skipTest("PyMongo does not support timeoutMode") def process_error(self, exception, spec): + if isinstance(exception, unittest.SkipTest): + raise is_error = spec.get("isError") is_client_error = spec.get("isClientError") is_timeout_error = spec.get("isTimeoutError") From 8456293da2c29142ca8fdf0c31e74b3bce657652 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Tue, 21 May 2024 11:30:43 -0700 Subject: [PATCH 2/2] PYTHON-4398 Close mongos test clients to avoid thread build up (#1643) --- test/unified_format.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unified_format.py b/test/unified_format.py index cf4e3a878..3f98b571b 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -1030,6 +1030,12 @@ class UnifiedSpecTestMixinV1(IntegrationTest): if "retryable-writes" in cls.TEST_SPEC["description"]: raise unittest.SkipTest("MMAPv1 does not support retryWrites=True") + @classmethod + def tearDownClass(cls): + for client in cls.mongos_clients: + client.close() + super().tearDownClass() + def setUp(self): super().setUp() # process schemaVersion