summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocalsocket
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-10 16:59:58 +0200
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-10 17:50:38 +0200
commit864520a0323fe56b290577befafd15b140433788 (patch)
treedebe6bc6f8c8e52a0d6d8a2e0cc52bb6f45a6832 /tests/auto/qlocalsocket
parentd0b1717877c22082e6bfb518c760fe9f293a52e2 (diff)
make tst_QLocalSocket::writeToClientAndDisconnect more robust
We must wait until all data is written before trying to read stuff. Reviewed-by: ossi
Diffstat (limited to 'tests/auto/qlocalsocket')
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index 3c4af48780..c0d870f3b4 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -893,7 +893,7 @@ void tst_QLocalSocket::writeToClientAndDisconnect()
char buffer[100];
memset(buffer, 0, sizeof(buffer));
QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer));
- clientSocket->flush();
+ clientSocket->waitForBytesWritten();
clientSocket->disconnectFromServer();
qApp->processEvents(); // give the socket the chance to receive data
QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer));