summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2020-09-21 21:24:42 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2020-09-21 21:24:42 +0100
commit39008c1f05b30e9ac51cf7c46743c9d2dc34f505 (patch)
treeee01a8e8ea70897f106d88279abb5e2250c55f3f
parent449652afa16160aaf2e36c81b64b0220e6ba96b1 (diff)
downloadunit-39008c1f05b30e9ac51cf7c46743c9d2dc34f505.tar.gz
unit-39008c1f05b30e9ac51cf7c46743c9d2dc34f505.tar.bz2
Tests: added test for "idle_timeout" with empty payload.
-rw-r--r--test/test_settings.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_settings.py b/test/test_settings.py
index 59b4a048..797af5ed 100644
--- a/test/test_settings.py
+++ b/test/test_settings.py
@@ -203,6 +203,24 @@ Connection: close
assert resp['status'] == 408, 'status idle timeout'
+ def test_settings_idle_timeout_2(self):
+ self.load('empty')
+
+ assert self.get()['status'] == 200, 'init'
+
+ self.conf({'http': {'idle_timeout': 1}}, 'settings')
+
+ _, sock = self.http(b'', start=True, raw=True, no_recv=True)
+
+ time.sleep(2)
+
+ assert (
+ self.get(
+ headers={'Host': 'localhost', 'Connection': 'close'}, sock=sock
+ )['status']
+ == 408
+ ), 'status idle timeout'
+
def test_settings_max_body_size(self):
self.load('empty')