summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-09-17 19:07:29 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-09-17 19:07:29 +0300
commit8065ba84aa490d1d50b4089d6102dfce6fbbfca9 (patch)
tree5f6e4bbfe6bcd8d00de041040cf1819fb451747c /test
parent7458f66ddad9921729bca8131c6d5482c7b57112 (diff)
downloadunit-8065ba84aa490d1d50b4089d6102dfce6fbbfca9.tar.gz
unit-8065ba84aa490d1d50b4089d6102dfce6fbbfca9.tar.bz2
Tests: test_settings_header_read_timeout_update adjusted.
Diffstat (limited to 'test')
-rw-r--r--test/test_settings.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/test_settings.py b/test/test_settings.py
index 4b9304e9..816dcb5e 100644
--- a/test/test_settings.py
+++ b/test/test_settings.py
@@ -25,10 +25,11 @@ Connection: close
self.assertEqual(resp['status'], 408, 'status header read timeout')
- @unittest.expectedFailure
def test_settings_header_read_timeout_update(self):
self.load('empty')
+ r = None
+
self.conf({'http': { 'header_read_timeout': 4 }}, 'settings')
(resp, sock) = self.http(b"""GET / HTTP/1.1
@@ -42,11 +43,15 @@ Connection: close
time.sleep(2)
(resp, sock) = self.http(b"""X-Blah: blah
-""", start=True, sock=sock, raw=True, no_recv=True)
+""", start=True, sock=sock, raw=True)
- time.sleep(2)
+ if len(resp) != 0:
+ sock.close()
+
+ else:
+ time.sleep(2)
- resp = self.http(b"""Connection: close
+ resp = self.http(b"""Connection: close
""", sock=sock, raw=True)