summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-20 12:42:29 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-29 10:12:17 +0000
commit38a0909d4ed39b49e0463bd780d20a82ea672d35 (patch)
treef71147c2c2755b155e7bf100d804ebe02ed9d5c9 /tests
parent9f0dda29d5d070f63b7f098139f01f07ec91ffdf (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qnetworkreply/BLACKLIST20
-rw-r--r--tests/auto/network/access/qnetworkreply/test/test.pro3
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp13
3 files changed, 32 insertions, 4 deletions
diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST
index 1d56c78bbc..f2ccefb9d6 100644
--- a/tests/auto/network/access/qnetworkreply/BLACKLIST
+++ b/tests/auto/network/access/qnetworkreply/BLACKLIST
@@ -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
diff --git a/tests/auto/network/access/qnetworkreply/test/test.pro b/tests/auto/network/access/qnetworkreply/test/test.pro
index 0dcf5a250c..1f45ac0c49 100644
--- a/tests/auto/network/access/qnetworkreply/test/test.pro
+++ b/tests/auto/network/access/qnetworkreply/test/test.pro
@@ -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
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 93afca3d48..099ea8ff39 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -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);