From fdf570f1d9561bfc349f24c87e1ac35afd2254e2 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Thu, 1 Aug 2019 18:15:00 +0300 Subject: Tests: added delay before SIGQUIT in access_log partial tests. This change is necessary to avoid race between client connection close and Unit close. Also "read_timeout" value decreased to speed up tests. --- test/test_access_log.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'test/test_access_log.py') diff --git a/test/test_access_log.py b/test/test_access_log.py index 49497ad2..fbcc131f 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -180,7 +180,9 @@ Connection: close self.assertEqual(self.post()['status'], 200, 'init') - resp = self.http(b"""GE""", raw=True, read_timeout=5) + resp = self.http(b"""GE""", raw=True, read_timeout=1) + + time.sleep(1) self.stop() @@ -206,7 +208,9 @@ Connection: close self.assertEqual(self.post()['status'], 200, 'init') - resp = self.http(b"""GET / HTTP/1.1""", raw=True, read_timeout=5) + resp = self.http(b"""GET / HTTP/1.1""", raw=True, read_timeout=1) + + time.sleep(1) self.stop() @@ -219,7 +223,9 @@ Connection: close self.assertEqual(self.post()['status'], 200, 'init') - resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, read_timeout=5) + resp = self.http(b"""GET / HTTP/1.1\n""", raw=True, read_timeout=1) + + time.sleep(1) self.stop() -- cgit