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>
This commit is contained in:
parent
011c221165
commit
682e4795fe
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user