From baf0344446ecfd4cbab118038165fffb61f020d4 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Tue, 4 Mar 2025 22:03:56 -0800 Subject: [PATCH] PYTHON-5167 Properly cleanup test SpecRunnerTask (#2181) --- test/asynchronous/unified_format.py | 1 + test/unified_format.py | 1 + 2 files changed, 2 insertions(+) diff --git a/test/asynchronous/unified_format.py b/test/asynchronous/unified_format.py index c3931da93..d4c3d40d2 100644 --- a/test/asynchronous/unified_format.py +++ b/test/asynchronous/unified_format.py @@ -384,6 +384,7 @@ class EntityMapUtil: name = spec["id"] thread = SpecRunnerTask(name) await thread.start() + self.test.addAsyncCleanup(thread.join, 5) self[name] = thread return diff --git a/test/unified_format.py b/test/unified_format.py index 8ed9e214b..293fbd97c 100644 --- a/test/unified_format.py +++ b/test/unified_format.py @@ -383,6 +383,7 @@ class EntityMapUtil: name = spec["id"] thread = SpecRunnerThread(name) thread.start() + self.test.addCleanup(thread.join, 5) self[name] = thread return