summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-05-21 14:40:37 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-05-21 14:40:37 (GMT)
commit1a58ac0a27c6e006b9d86827d7e4b1000f56ae38 (patch)
treeb54b7a01d21320ba3626186a36405da3e16dacd2 /tests/auto/qlocalsocket/tst_qlocalsocket.cpp
parent3bcec82fe724f0e6b48557d3ac4cd48fb8426696 (diff)
downloadQt-1a58ac0a27c6e006b9d86827d7e4b1000f56ae38.zip
Qt-1a58ac0a27c6e006b9d86827d7e4b1000f56ae38.tar.gz
Qt-1a58ac0a27c6e006b9d86827d7e4b1000f56ae38.tar.bz2
Long time when waiting in test case will not help in this case.
Diffstat (limited to 'tests/auto/qlocalsocket/tst_qlocalsocket.cpp')
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index 5d73c98..b272716 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -492,11 +492,11 @@ void tst_QLocalSocket::sendData()
// test creating a connection
socket.connectToServer(name);
bool timedOut = true;
+
QCOMPARE(server.waitForNewConnection(3000, &timedOut), canListen);
-#if defined(QT_LOCALSOCKET_TCP)
+
+#if defined(QT_LOCALSOCKET_TCP) || defined(Q_OS_SYMBIAN)
QTest::qWait(250);
-#elif defined(Q_OS_SYMBIAN)
- QTest::qWait(10000);
#endif
QVERIFY(!timedOut);
QCOMPARE(spyConnected.count(), canListen ? 1 : 0);
@@ -530,7 +530,9 @@ void tst_QLocalSocket::sendData()
QCOMPARE(spyReadyRead.count(), 1);
QVERIFY(testLine.startsWith(in.readLine()));
+
QVERIFY(wrote || serverSocket->waitForBytesWritten(1000));
+
QCOMPARE(serverSocket->errorString(), QString("Unknown error"));
QCOMPARE(socket.errorString(), QString("Unknown error"));
}