From 5a2f2b831f4190e74ccd2b6be263370d02fca56a Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Thu, 23 Apr 2020 10:28:31 -0700 Subject: tests/server.py: Add time.sleep() delay after shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is to help prevent a possible threading lock error if traceback errors are raised. I was experiencing this fault while debugging python 3.7 and 3.8 test errors. It prevented the sys.exit() at the end of the tests. Signed-off-by: Brian Dolbec Signed-off-by: Ulrich Müller --- tests/server.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/server.py b/tests/server.py index 51d49b7..6a32a2d 100644 --- a/tests/server.py +++ b/tests/server.py @@ -13,6 +13,7 @@ import os import threading +import time from g_sorcery.compatibility import py2k @@ -49,3 +50,4 @@ class Server(threading.Thread): def shutdown(self): self.httpd.shutdown() + time.sleep(0.5) -- cgit v1.2.3-65-gdbad