From 8456293da2c29142ca8fdf0c31e74b3bce657652 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Tue, 21 May 2024 11:30:43 -0700 Subject: [PATCH] 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