Fix tst_QSslSocket::waitForConnectedEncryptedReadyRead

... and unblacklist it.

It was blacklisted some years ago because it was failing too often.
It was failing because the ssl socket had already received and decrypted
all the data it was going to get, meaning the waitForReadyRead call was
just going to block forever.

Change-Id: Ia540735177d4e1be8696f2d752f1d7813faecfe5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Mårten Nordheim 2017-11-17 14:44:36 +01:00 committed by Timur Pocheptsov
parent 53f48fceee
commit c3a5c482ef
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,4 @@
windows
[waitForConnectedEncryptedReadyRead:WithSocks5ProxyAuth]
*
[protocolServerSide:ssl3-any]
rhel-7.2
[protocolServerSide:tls1.0-any]

View File

@ -1587,7 +1587,12 @@ void tst_QSslSocket::waitForConnectedEncryptedReadyRead()
QFETCH_GLOBAL(bool, setProxy);
if (setProxy && !socket->waitForEncrypted(10000))
QSKIP("Skipping flaky test - See QTBUG-29941");
QVERIFY(socket->waitForReadyRead(10000));
// We only do this if we have no bytes available to read already because readyRead will
// not be emitted again.
if (socket->bytesAvailable() == 0)
QVERIFY(socket->waitForReadyRead(10000));
QVERIFY(!socket->peerCertificate().isNull());
QVERIFY(!socket->peerCertificateChain().isEmpty());
}