test_node_websockets.py (1262:ba07e83ecf6f) test_node_websockets.py (1438:5e5a3897e0cd)
1import time
2import struct
3import unittest
4from unit.applications.lang.node import TestApplicationNode
5from unit.applications.websockets import TestApplicationWebsocket
6
7
8class TestNodeWebsockets(TestApplicationNode):

--- 8 unchanged lines hidden (view full) ---

17 'success',
18 self.conf(
19 {'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
20 ),
21 'clear keepalive_interval',
22 )
23
24 self.skip_alerts.extend(
1import time
2import struct
3import unittest
4from unit.applications.lang.node import TestApplicationNode
5from unit.applications.websockets import TestApplicationWebsocket
6
7
8class TestNodeWebsockets(TestApplicationNode):

--- 8 unchanged lines hidden (view full) ---

17 'success',
18 self.conf(
19 {'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
20 ),
21 'clear keepalive_interval',
22 )
23
24 self.skip_alerts.extend(
25 [r'last message send failed', r'socket close\(\d+\) failed']
25 [r'socket close\(\d+\) failed']
26 )
27
28 def close_connection(self, sock):
29 self.assertEqual(self.recvall(sock, read_timeout=1), b'', 'empty sock')
30
31 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
32
33 self.check_close(sock)

--- 1422 unchanged lines hidden ---
26 )
27
28 def close_connection(self, sock):
29 self.assertEqual(self.recvall(sock, read_timeout=1), b'', 'empty sock')
30
31 self.ws.frame_write(sock, self.ws.OP_CLOSE, self.ws.serialize_close())
32
33 self.check_close(sock)

--- 1422 unchanged lines hidden ---