tst_qnetworkreply: Replace insignificant_test with blacklisting

Neither the exit crash of QTBUG-21102 nor the Windows failure of
QTBUG-24226 appear to be reproduceable.

Add verbose error reporting to getErrors() and blacklist
getErrors:ftp-host which has been found to fail with timeouts
on Linux and ioHttpRedirectMultipartPost.

Task-number: QTBUG-21102
Task-number: QTBUG-24226
Task-number: QTBUG-62860
Change-Id: I6b29f6184e83de8ffebf6ff0d80606512dca6419
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
Friedemann Kleint 2017-10-20 12:42:29 +02:00
parent 9f0dda29d5
commit 38a0909d4e
3 changed files with 32 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# See qtbase/src/testlib/qtestblacklist.cpp for format
osx
[authenticationCacheAfterCancel]
windows
[ioGetFromBuiltinHttp:http+limited]
ubuntu-14.04
[ioGetFromBuiltinHttp:https+limited]
@ -8,3 +10,21 @@ ubuntu-14.04
*
[backgroundRequestInterruption:ftp, bg, nobg]
*
[getErrors:ftp-host]
linux
[getFromHttpIntoBuffer]
windows
[getFromHttpIntoBuffer2]
windows
[headFromHttp]
windows
[ioGetFromHttpWithSocksProxy]
windows
[ioPostToHttpFromSocket]
windows
[ioHttpRedirectMultipartPost]
linux
[putWithServerClosingConnectionImmediately]
windows
[qtbug28035browserDoesNotLoadQtProjectOrgCorrectly]
windows

View File

@ -13,7 +13,4 @@ RESOURCES += ../qnetworkreply.qrc
TESTDATA += ../empty ../rfc3252.txt ../resource ../bigfile ../*.jpg ../certs \
../index.html ../smb-file.txt
qtConfig(xcb): CONFIG+=insignificant_test # unstable, QTBUG-21102
win32:CONFIG += insignificant_test # QTBUG-24226
!winrt: TEST_HELPER_INSTALLS = ../echo/echo

View File

@ -1994,6 +1994,16 @@ void tst_QNetworkReply::getErrors_data()
<< int(QNetworkReply::AuthenticationRequiredError) << 401 << false;
}
static QByteArray msgGetErrors(int waitResult, const QNetworkReplyPtr &reply)
{
QByteArray result ="waitResult=" + QByteArray::number(waitResult);
if (reply->isFinished())
result += ", finished";
if (reply->error() != QNetworkReply::NoError)
result += ", error: " + QByteArray::number(int(reply->error()));
return result;
}
void tst_QNetworkReply::getErrors()
{
QFETCH(QString, url);
@ -2023,7 +2033,8 @@ void tst_QNetworkReply::getErrors()
QCOMPARE(reply->error(), QNetworkReply::NoError);
// now run the request:
QVERIFY(waitForFinish(reply) != Timeout);
const int waitResult = waitForFinish(reply);
QVERIFY2(waitResult != Timeout, msgGetErrors(waitResult, reply));
QFETCH(int, error);
QEXPECT_FAIL("ftp-is-dir", "QFtp cannot provide enough detail", Abort);