diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-05-06 14:18:38 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-05-06 14:18:38 (GMT) |
commit | ead212aff40b2edbefb1a10ba14f0afed7236995 (patch) | |
tree | 40c82d4b47a9502b6e032b8df2a94fbeec6cfe44 /tests/auto/qsslsocket | |
parent | 913a78a9288bf1f68f4975bec5cc58e699c09f39 (diff) | |
parent | 1b0916db13a52d99dad93322aae0c5c6ba4c2d18 (diff) | |
download | Qt-ead212aff40b2edbefb1a10ba14f0afed7236995.zip Qt-ead212aff40b2edbefb1a10ba14f0afed7236995.tar.gz Qt-ead212aff40b2edbefb1a10ba14f0afed7236995.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index e238526..c9f9cbd 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -1493,12 +1493,27 @@ void tst_QSslSocket::disconnectFromHostWhenConnected() QSslSocketPtr socket = newSocket(); socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 993); socket->ignoreSslErrors(); +#ifndef Q_OS_SYMBIAN QVERIFY(socket->waitForEncrypted(5000)); +#else + QVERIFY(socket->waitForEncrypted(10000)); +#endif socket->write("XXXX LOGOUT\r\n"); QCOMPARE(socket->state(), QAbstractSocket::ConnectedState); socket->disconnectFromHost(); QCOMPARE(socket->state(), QAbstractSocket::ClosingState); - QVERIFY(socket->waitForDisconnected(5000)); +#ifdef Q_OS_SYMBIAN + // I don't understand how socket->waitForDisconnected can work on other platforms + // since socket->write will end to: + // QMetaObject::invokeMethod(this, "_q_flushWriteBuffer", Qt::QueuedConnection); + // In order that _q_flushWriteBuffer will be called the eventloop need to run + // If we just call waitForDisconnected, which blocks the whole thread how that can happen? + connect(socket, SIGNAL(disconnected()), this, SLOT(exitLoop())); + enterLoop(5); + QVERIFY(!timeout()); +#else + QVERIFY(socket->waitForDisconnected(5000)); +#endif QCOMPARE(socket->bytesToWrite(), qint64(0)); } |