summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-12-25 16:35:35 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-12-25 16:35:35 +0300
commitf5b7fee128dfabc3225e05a69a5c9458b63c315b (patch)
treebca3e599784da827cd761e987ab1a488b857c578 /test
parentd625691ff45bd6f352a504694629af2407a7d1a1 (diff)
downloadunit-f5b7fee128dfabc3225e05a69a5c9458b63c315b.tar.gz
unit-f5b7fee128dfabc3225e05a69a5c9458b63c315b.tar.bz2
Tests: set TCP_NODELAY option by default.
Diffstat (limited to 'test')
-rw-r--r--test/unit.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit.py b/test/unit.py
index e88ed684..2b95b792 100644
--- a/test/unit.py
+++ b/test/unit.py
@@ -309,6 +309,9 @@ class TestUnitHTTP(TestUnit):
if 'sock' not in kwargs:
sock = socket.socket(sock_types[sock_type], socket.SOCK_STREAM)
+ if sock_type == sock_types['ipv4'] or sock_type == sock_types['ipv6']:
+ sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
+
if 'wrapper' in kwargs:
sock = kwargs['wrapper'](sock)