test_java_websockets.py (1635:97afbb6c5a15) test_java_websockets.py (1654:fc7d0578e124)
1import struct
2import time
3
4import pytest
5
6from conftest import option
7from conftest import skip_alert
8from unit.applications.lang.java import TestApplicationJava
9from unit.applications.websockets import TestApplicationWebsocket
10
11
12class TestJavaWebsockets(TestApplicationJava):
13 prerequisites = {'modules': {'java': 'any'}}
14
15 ws = TestApplicationWebsocket()
16
17 def setup_method(self):
1import struct
2import time
3
4import pytest
5
6from conftest import option
7from conftest import skip_alert
8from unit.applications.lang.java import TestApplicationJava
9from unit.applications.websockets import TestApplicationWebsocket
10
11
12class TestJavaWebsockets(TestApplicationJava):
13 prerequisites = {'modules': {'java': 'any'}}
14
15 ws = TestApplicationWebsocket()
16
17 def setup_method(self):
18 super().setup_method()
19
20 assert 'success' in self.conf(
21 {'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
22 ), 'clear keepalive_interval'
23
24 skip_alert(r'socket close\(\d+\) failed')
25
26 def close_connection(self, sock):
27 assert self.recvall(sock, read_timeout=0.1) == b'', 'empty soc'

--- 1375 unchanged lines hidden ---
18 assert 'success' in self.conf(
19 {'http': {'websocket': {'keepalive_interval': 0}}}, 'settings'
20 ), 'clear keepalive_interval'
21
22 skip_alert(r'socket close\(\d+\) failed')
23
24 def close_connection(self, sock):
25 assert self.recvall(sock, read_timeout=0.1) == b'', 'empty soc'

--- 1375 unchanged lines hidden ---