From 300bad3f6bb701a809ef5d964871b2c51d6a89aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Wed, 22 Nov 2023 01:37:11 +0100 Subject: [PATCH] Assert that only one thread is active in trytond.application --- trytond/trytond/application.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trytond/trytond/application.py b/trytond/trytond/application.py index bc35564921..a963e6972e 100644 --- a/trytond/trytond/application.py +++ b/trytond/trytond/application.py @@ -41,3 +41,5 @@ if db_names: threads.append(thread) for thread in threads: thread.join() + +assert len(threads := threading.enumerate()) == 1, f"len({threads}) != 1"