Tests: Node.js websockets tests tuned.

This commit is contained in:
Andrey Zelenkov
2019-08-22 18:28:23 +03:00
parent e291841b33
commit 72b56388b7
2 changed files with 16 additions and 5 deletions

View File

@@ -57,7 +57,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=1):
def frame_read(self, sock, read_timeout=5):
def recv_bytes(sock, bytes):
data = b''
while select.select([sock], [], [], read_timeout)[0]:
@@ -204,7 +204,7 @@ class TestApplicationWebsocket(TestApplicationProto):
op_code = self.OP_CONT
pos = end
def message_read(self, sock, read_timeout=1):
def message_read(self, sock, read_timeout=5):
frame = self.frame_read(sock, read_timeout=read_timeout)
while(not frame['fin']):