summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtcpsocket
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-05-05 11:30:15 +0300
committerJanne Anttila <janne.anttila@digia.com>2009-05-05 11:33:56 +0300
commitbf1b80a7359a39040a30e17a6f4608e2e3b443ce (patch)
tree4c77a2d63c0ffc07b4779bbaf8eb3f78d7ad5efa /tests/auto/qtcpsocket
parentf8a84a253aae0ba880ac5b25eddddbde5033fb48 (diff)
Enabled disconnectWhileConnectingNoEventLoop test case for Symbian OS.
Had to increase also test case timeouts to make it pass in Symbian OS.
Diffstat (limited to 'tests/auto/qtcpsocket')
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 2e039bf48d..da3f19a057 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -944,7 +944,7 @@ public:
: server(0), ok(false), quit(false)
{ }
- ~ReceiverThread() { wait(); delete server; }
+ ~ReceiverThread() { /*delete server;*/ terminate(); wait(); }
bool listen()
{
@@ -969,7 +969,11 @@ protected:
QTcpSocket *socket = server->nextPendingConnection();
while (!quit) {
+#ifndef Q_OS_SYMBIAN
if (socket->waitForDisconnected(500))
+#else
+ if (socket->waitForDisconnected(1000))
+#endif
break;
if (socket->error() != QAbstractSocket::SocketTimeoutError)
return;
@@ -992,8 +996,6 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop_data()
void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
{
- QSKIP("Check this", SkipAll);
-
QFETCH(QByteArray, data);
ReceiverThread thread;
@@ -1019,7 +1021,11 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
socket->disconnectFromHost();
}
+#ifndef Q_OS_SYMBIAN
QVERIFY2(socket->waitForDisconnected(10000), "Network timeout");
+#else
+ QVERIFY2(socket->waitForDisconnected(20000), "Network timeout");
+#endif
QVERIFY(socket->state() == QAbstractSocket::UnconnectedState);
if (!closeDirectly) {
QCOMPARE(int(socket->openMode()), int(QIODevice::ReadWrite));