diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2020-03-23 19:18:26 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2020-03-23 19:18:26 +0000 |
commit | 48ad88ee7209fd949f3ed1075f62ca78c2220224 (patch) | |
tree | ecf9442c82b4f94054116c76102011a9298b10d6 /test/unit/applications | |
parent | ac9ca6d75cf8987b6650923aa126c0d3ab06f41e (diff) | |
download | unit-48ad88ee7209fd949f3ed1075f62ca78c2220224.tar.gz unit-48ad88ee7209fd949f3ed1075f62ca78c2220224.tar.bz2 |
Tests: increase default "read_timeout" value to 60s.
This change is necessary to avoid errors on slow hosts.
Also slightly reworked argument passing to the recvall() function.
Diffstat (limited to 'test/unit/applications')
-rw-r--r-- | test/unit/applications/websockets.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/applications/websockets.py b/test/unit/applications/websockets.py index ef16f433..eaed2ee7 100644 --- a/test/unit/applications/websockets.py +++ b/test/unit/applications/websockets.py @@ -52,7 +52,7 @@ class TestApplicationWebsocket(TestApplicationProto): ) resp = '' - while select.select([sock], [], [], 30)[0]: + while select.select([sock], [], [], 60)[0]: resp += sock.recv(4096).decode() if ( @@ -70,7 +70,7 @@ class TestApplicationWebsocket(TestApplicationProto): def serialize_close(self, code=1000, reason=''): return struct.pack('!H', code) + reason.encode('utf-8') - def frame_read(self, sock, read_timeout=30): + def frame_read(self, sock, read_timeout=60): def recv_bytes(sock, bytes): data = b'' while select.select([sock], [], [], read_timeout)[0]: |