From bf1b80a7359a39040a30e17a6f4608e2e3b443ce Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 5 May 2009 11:30:15 +0300 Subject: Enabled disconnectWhileConnectingNoEventLoop test case for Symbian OS. Had to increase also test case timeouts to make it pass in Symbian OS. --- tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index 2e039bf..da3f19a 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)); -- cgit v0.12