commit: 5a2f2b831f4190e74ccd2b6be263370d02fca56a
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 17:28:31 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Tue May 4 15:48:07 2021 +0000
URL: https://gitweb.gentoo.org/proj/g-sorcery.git/commit/?id=5a2f2b83
tests/server.py: Add time.sleep() delay after shutdown
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 <dolsen <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
tests/server.py | 2 ++
1 file changed, 2 insertions(+)
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)