summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
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/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
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/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp13
1 files changed, 12 insertions, 1 deletions
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);