From 7733eef9fd03f70ee3a1830796a14821ee20d159 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Mon, 29 Jun 2015 17:55:28 +0200 Subject: [PATCH] Properly wait for server shutdown in test harness teardown. --- test/test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test.py b/test/test.py index 2e15c47..34183ea 100644 --- a/test/test.py +++ b/test/test.py @@ -232,6 +232,10 @@ class WebAppTest(unittest.TestCase): @classmethod def tearDownClass(cls): cls.sf.shutdown() + while True: + time.sleep(0.1) + if not cls.sf.running: + break def testError404(self): r = requests.get('http://localhost:8002/nosuchurl')