summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtcpsocket
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-05-21 07:14:08 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-05-21 07:14:08 (GMT)
commit0987e68043e174a2a033b58d065c6069c0cf8a1a (patch)
tree8b9caa9442e750db2cd8fdcc734a05eb0fae35a7 /tests/auto/qtcpsocket
parentb793f13f7787f63e496ab010252c92cf6f9d5567 (diff)
downloadQt-0987e68043e174a2a033b58d065c6069c0cf8a1a.zip
Qt-0987e68043e174a2a033b58d065c6069c0cf8a1a.tar.gz
Qt-0987e68043e174a2a033b58d065c6069c0cf8a1a.tar.bz2
Need some longer timeout values in test cases.
Diffstat (limited to 'tests/auto/qtcpsocket')
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index da3f19a..f2ea2d9 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -961,7 +961,11 @@ protected:
{
bool timedOut = false;
while (!quit) {
+#ifndef Q_OS_SYMBIAN
if (server->waitForNewConnection(500, &timedOut))
+#else
+ if (server->waitForNewConnection(5000, &timedOut))
+#endif
break;
if (!timedOut)
return;
@@ -972,7 +976,7 @@ protected:
#ifndef Q_OS_SYMBIAN
if (socket->waitForDisconnected(500))
#else
- if (socket->waitForDisconnected(1000))
+ if (socket->waitForDisconnected(5000))
#endif
break;
if (socket->error() != QAbstractSocket::SocketTimeoutError)
@@ -1024,7 +1028,7 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
#ifndef Q_OS_SYMBIAN
QVERIFY2(socket->waitForDisconnected(10000), "Network timeout");
#else
- QVERIFY2(socket->waitForDisconnected(20000), "Network timeout");
+ QVERIFY2(socket->waitForDisconnected(30000), "Network timeout");
#endif
QVERIFY(socket->state() == QAbstractSocket::UnconnectedState);
if (!closeDirectly) {
@@ -1035,7 +1039,7 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
delete socket;
// check if the other side received everything ok
- QVERIFY(thread.wait(10000));
+ QVERIFY(thread.wait(30000));
QVERIFY(thread.ok);
QCOMPARE(thread.receivedData, data);
}
@@ -1074,7 +1078,7 @@ void tst_QTcpSocket::disconnectWhileLookingUp()
#ifndef Q_OS_SYMBIAN
QTimer::singleShot(50, &loop, SLOT(quit()));
#else
- QTimer::singleShot(500, &loop, SLOT(quit()));
+ QTimer::singleShot(5000, &loop, SLOT(quit()));
#endif
loop.exec();
@@ -1321,11 +1325,19 @@ void tst_QTcpSocket::dontCloseOnTimeout()
QTcpSocket *socket = newSocket();
socket->connectToHost(serverAddress, server.serverPort());
+#ifndef Q_OS_SYMBIAN
QVERIFY(!socket->waitForReadyRead(100));
+#else
+ QVERIFY(!socket->waitForReadyRead(5000));
+#endif
QCOMPARE(socket->error(), QTcpSocket::SocketTimeoutError);
QVERIFY(socket->isOpen());
+#ifndef Q_OS_SYMBIAN
QVERIFY(!socket->waitForDisconnected(100));
+#else
+ QVERIFY(!socket->waitForDisconnected(5000));
+#endif
QCOMPARE(socket->error(), QTcpSocket::SocketTimeoutError);
QVERIFY(socket->isOpen());