summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2019-07-04 14:14:28 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2019-07-08 12:12:39 +0200
commit682e4795fe7a5ae64268212b23ff96706a0822d9 (patch)
tree29a3041d1f24d510caa0779d832dd736717d6cd9 /tests
parent011c22116590ffed105e6630d8bc4b802d80484d (diff)
QNetworkReply: Skip a test when QNetworkStatusMonitor is enabled
QNetworkSession has a concept of UsagePolicy which can disable background* transfers to conserve battery or bandwidth. However, it is only possible to change the policy through QNetworkSessionPrivate::setUsagePolicy which currently doesn't have any callers outside of our auto tests. *background = transfers not initiated directly by the user, but needs to be marked as such by the application developer. Change-Id: I92c4abccaca040612b4795abe7c52d68a2d21749 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
index 1afd8af7b0..6f00780d81 100644
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
@@ -8200,6 +8200,9 @@ void tst_QNetworkReply::backgroundRequestInterruption_data()
void tst_QNetworkReply::backgroundRequestInterruption()
{
#ifndef QT_NO_BEARERMANAGEMENT
+ if (QNetworkStatusMonitor::isEnabled() && QByteArray(QTest::currentDataTag()).startsWith("http"))
+ QSKIP("This test (currently) doesn't make any sense when QNetworkStatusMonitor is enabled");
+
QFETCH(QUrl, url);
QFETCH(bool, background);
QFETCH(QNetworkReply::NetworkError, error);