diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-09-10 14:59:58 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-09-10 15:50:38 (GMT) |
commit | 864520a0323fe56b290577befafd15b140433788 (patch) | |
tree | debe6bc6f8c8e52a0d6d8a2e0cc52bb6f45a6832 /tests/auto/qlocalsocket | |
parent | d0b1717877c22082e6bfb518c760fe9f293a52e2 (diff) | |
download | Qt-864520a0323fe56b290577befafd15b140433788.zip Qt-864520a0323fe56b290577befafd15b140433788.tar.gz Qt-864520a0323fe56b290577befafd15b140433788.tar.bz2 |
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 3c4af48..c0d870f 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)); |