mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-04 13:57:44 +00:00
fix server client issues
- add test for server stops until clients connected - add header for data packets - check header on read and read only data size in - make readings non blocking
This commit is contained in:
parent
5989e5786f
commit
6f364b8e6a
4 changed files with 65 additions and 20 deletions
|
|
@ -160,6 +160,15 @@ def test_serverDoubleStart():
|
|||
assert testServer2.stop()
|
||||
|
||||
|
||||
def test_serverStopsWhileConnected(getRunningServer, getClient):
|
||||
"""!Shutdown server while client is connected"""
|
||||
getClient.connect()
|
||||
getRunningServer.stop()
|
||||
time.sleep(1)
|
||||
assert getClient.isConnected # todo check why the first always return true here
|
||||
assert not getClient.isConnected
|
||||
|
||||
|
||||
@pytest.mark.skip("needs fixture for more than one client")
|
||||
def test_serverGetOutput(getRunningServer):
|
||||
"""!Send data to server with 2 clients, check '[ack]' and data on server queue"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue