summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-08-01 18:15:00 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-08-01 18:15:00 +0300
commitfdf570f1d9561bfc349f24c87e1ac35afd2254e2 (patch)
tree02a38318b3c62da8ad7a9d10616a32845ed14aab /test
parent7785c96c1aea16dee0ec17403fda01b4f5ba41b3 (diff)
downloadunit-fdf570f1d9561bfc349f24c87e1ac35afd2254e2.tar.gz
unit-fdf570f1d9561bfc349f24c87e1ac35afd2254e2.tar.bz2
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.
Diffstat (limited to 'test')
-rw-r--r--test/test_access_log.py12
1 files changed, 9 insertions, 3 deletions
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()