diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-02-23 18:20:14 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-02-24 16:46:54 (GMT) |
commit | 88e192419ed928be1239d7a928336332f1d521f4 (patch) | |
tree | db323b65ad37c6e048497f4d2db99e160ff14618 /tests/auto/qsslsocket | |
parent | 6a8a70b434c61bc39e4aad0036012e78fa690b1d (diff) | |
download | Qt-88e192419ed928be1239d7a928336332f1d521f4.zip Qt-88e192419ed928be1239d7a928336332f1d521f4.tar.gz Qt-88e192419ed928be1239d7a928336332f1d521f4.tar.bz2 |
Fix symbian test failures for qsslsocket
Increased timeout on some unstable test cases.
Added a Q_EXPECT_FAIL if we can't connect to a server which is inside
firewall.
Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 9a98712..1c34759 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -519,6 +519,7 @@ void tst_QSslSocket::sslErrors_data() << (SslErrorList() << QSslError::HostNameMismatch << QSslError::SelfSignedCertificate); + //note this test case does not work outside Nokia network QTest::newRow("imap.trolltech.com") << "imap.trolltech.com" << 993 @@ -533,6 +534,8 @@ void tst_QSslSocket::sslErrors() QSslSocketPtr socket = newSocket(); socket->connectToHostEncrypted(host, port); + if (!socket->waitForConnected()) + QEXPECT_FAIL("imap.trolltech.com", "server not open to internet", Continue); socket->waitForEncrypted(5000); SslErrorList output; @@ -650,7 +653,7 @@ void tst_QSslSocket::sessionCipher() connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot())); QVERIFY(socket->sessionCipher().isNull()); socket->connectToHost(QtNetworkSettings::serverName(), 443 /* https */); - QVERIFY(socket->waitForConnected(5000)); + QVERIFY(socket->waitForConnected(10000)); QVERIFY(socket->sessionCipher().isNull()); socket->startClientEncryption(); QVERIFY(socket->waitForEncrypted(5000)); @@ -684,7 +687,7 @@ void tst_QSslSocket::localCertificate() socket->setPrivateKey(QLatin1String(SRCDIR "certs/fluke.key")); socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443); - QVERIFY(socket->waitForEncrypted(5000)); + QVERIFY(socket->waitForEncrypted(10000)); } void tst_QSslSocket::mode() @@ -1608,7 +1611,7 @@ void tst_QSslSocket::disconnectFromHostWhenConnecting() QCOMPARE(state, socket->state()); QVERIFY(socket->state() == QAbstractSocket::HostLookupState || socket->state() == QAbstractSocket::ConnectingState); - QVERIFY(socket->waitForDisconnected(5000)); + QVERIFY(socket->waitForDisconnected(10000)); QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState); // we did not call close, so the socket must be still open QVERIFY(socket->isOpen()); |