Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/g-sorcery:master commit in: tests/
Date: Tue, 04 May 2021 15:50:40
Message-Id: 1620143287.5a2f2b831f4190e74ccd2b6be263370d02fca56a.ulm@gentoo
1 commit: 5a2f2b831f4190e74ccd2b6be263370d02fca56a
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 23 17:28:31 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 15:48:07 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/g-sorcery.git/commit/?id=5a2f2b83
7
8 tests/server.py: Add time.sleep() delay after shutdown
9
10 This is to help prevent a possible threading lock error if
11 traceback errors are raised.
12 I was experiencing this fault while debugging python 3.7 and 3.8 test
13 errors. It prevented the sys.exit() at the end of the tests.
14
15 Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
16 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
17
18 tests/server.py | 2 ++
19 1 file changed, 2 insertions(+)
20
21 diff --git a/tests/server.py b/tests/server.py
22 index 51d49b7..6a32a2d 100644
23 --- a/tests/server.py
24 +++ b/tests/server.py
25 @@ -13,6 +13,7 @@
26
27 import os
28 import threading
29 +import time
30
31 from g_sorcery.compatibility import py2k
32
33 @@ -49,3 +50,4 @@ class Server(threading.Thread):
34
35 def shutdown(self):
36 self.httpd.shutdown()
37 + time.sleep(0.5)