Commit 6ce97375 authored by Marc R. Hoffmann's avatar Marc R. Hoffmann Committed by Evgeny Mandrikov
Browse files

Fix random test failures in TcpClientOutputTest and TcpConnectionTest

testInvalidCommand in TcpClientOutputTest used to fail randomly as two
threads working on each side of the socket connection while the socket
gets closed due to the invalid command. This is now fixed by
* don't read data at the remote socket at all, this is not required by
the test case,
* wait until all data has been consumed by the TcpClientOutput before
the connection is shut down.

testRemoteClose in TcpConnectionTest and in TcpClientOutputTest
used to fail randomly as two threads working on each side of the
socket connection while the socket gets closed. This is now fixed by
waiting until the header is fully read before the socket is closed.

To avoid lock situations in MockServerConnection the lock must be
notified when the internal buffer is decreased.
parent c63563d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment