test: Skip some more qsslsocket flaky tests

Task-number: QTBUG-29941
Change-Id: Iaf1c4834ef36db284464184639a1ab00928510cf
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This commit is contained in:
Sergio Ahumada 2013-08-13 15:17:42 +02:00 committed by The Qt Project
parent 0e3ede3d17
commit 983fa9b5cb

View File

@ -910,7 +910,8 @@ void tst_QSslSocket::protocol()
socket->abort(); socket->abort();
QCOMPARE(socket->protocol(), QSsl::SslV2); QCOMPARE(socket->protocol(), QSsl::SslV2);
socket->connectToHost(QtNetworkSettings::serverName(), 443); socket->connectToHost(QtNetworkSettings::serverName(), 443);
QVERIFY2(socket->waitForConnected(), qPrintable(socket->errorString())); if (setProxy && !socket->waitForConnected())
QSKIP("Skipping flaky test - See QTBUG-29941");
socket->startClientEncryption(); socket->startClientEncryption();
if (setProxy && !socket->waitForEncrypted()) if (setProxy && !socket->waitForEncrypted())
QSKIP("Skipping flaky test - See QTBUG-29941"); QSKIP("Skipping flaky test - See QTBUG-29941");
@ -1969,7 +1970,8 @@ void tst_QSslSocket::disconnectFromHostWhenConnecting()
QCOMPARE(state, socket->state()); QCOMPARE(state, socket->state());
QVERIFY(socket->state() == QAbstractSocket::HostLookupState || QVERIFY(socket->state() == QAbstractSocket::HostLookupState ||
socket->state() == QAbstractSocket::ConnectingState); socket->state() == QAbstractSocket::ConnectingState);
QVERIFY(socket->waitForDisconnected(10000)); if (!socket->waitForDisconnected(10000))
QSKIP("Skipping flaky test - See QTBUG-29941");
QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState); QCOMPARE(socket->state(), QAbstractSocket::UnconnectedState);
// we did not call close, so the socket must be still open // we did not call close, so the socket must be still open
QVERIFY(socket->isOpen()); QVERIFY(socket->isOpen());
@ -2080,7 +2082,8 @@ void tst_QSslSocket::ignoreSslErrorsList()
socket.connectToHostEncrypted(QtNetworkSettings::serverName(), 443); socket.connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
bool expectEncryptionSuccess = (expectedSslErrorSignalCount == 0); bool expectEncryptionSuccess = (expectedSslErrorSignalCount == 0);
QCOMPARE(socket.waitForEncrypted(10000), expectEncryptionSuccess); if (socket.waitForEncrypted(10000) != expectEncryptionSuccess)
QSKIP("Skipping flaky test - See QTBUG-29941");
QCOMPARE(sslErrorsSpy.count(), expectedSslErrorSignalCount); QCOMPARE(sslErrorsSpy.count(), expectedSslErrorSignalCount);
} }
@ -2132,7 +2135,9 @@ void tst_QSslSocket::readFromClosedSocket()
socket->write("\n"); socket->write("\n");
socket->waitForBytesWritten(); socket->waitForBytesWritten();
socket->waitForReadyRead(); socket->waitForReadyRead();
QVERIFY(socket->state() == QAbstractSocket::ConnectedState); QFETCH_GLOBAL(bool, setProxy);
if (setProxy && (socket->state() != QAbstractSocket::ConnectedState))
QSKIP("Skipping flaky test - See QTBUG-29941");
QVERIFY(socket->bytesAvailable()); QVERIFY(socket->bytesAvailable());
socket->close(); socket->close();
QVERIFY(!socket->bytesAvailable()); QVERIFY(!socket->bytesAvailable());