Test disconnect on server-stop
This commit is contained in:
parent
962fd486af
commit
2753f548fe
|
@ -0,0 +1,4 @@
|
|||
2015-05-18 15:00:00.000000|INFO |VirtualServer| 1| listening on 0.0.0.0:9987
|
||||
2015-05-18 15:30:00.000000|INFO |VirtualServerBase| 3| client connected 'Client1'(id:1) from 1.2.3.4:1234
|
||||
2015-05-18 15:40:00.000000|INFO |VirtualServerBase| 3| client connected 'Client2'(id:2) from 5.6.7.8:5678
|
||||
2015-05-18 15:50:00.000000|INFO |VirtualServerBase| 1| stopped
|
|
@ -96,3 +96,9 @@ def test_parse_utf8():
|
|||
servers = parse_logs(testlog_path + '.utf8')
|
||||
render_servers(servers, output_path)
|
||||
remove(output_path)
|
||||
|
||||
|
||||
def test_server_stop():
|
||||
clients = _parse_details('tsstats/tests/res/test.log.stopped')
|
||||
assert clients['1'].onlinetime.seconds / 60 == 20 # minutes
|
||||
assert clients['2'].onlinetime.seconds / 60 == 10 # minutes
|
||||
|
|
Loading…
Reference in New Issue