PYTHON-5167 Properly cleanup test SpecRunnerTask (#2181)

This commit is contained in:
Shane Harvey 2025-03-04 22:03:56 -08:00 committed by GitHub
parent 74b85d51d5
commit baf0344446
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -383,6 +383,7 @@ class EntityMapUtil:
name = spec["id"]
thread = SpecRunnerThread(name)
thread.start()
self.test.addCleanup(thread.join, 5)
self[name] = thread
return