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:
Bastian Schroll 2019-10-20 17:11:20 +02:00
parent 5989e5786f
commit 6f364b8e6a
4 changed files with 65 additions and 20 deletions

View file

@ -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"""