summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMårten Nordheim <morten242@gmail.com>2020-06-12 12:07:54 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-07-30 16:56:40 +0200
commita96fc6e65cba14d80665ef5f8932f004f7f4a1e3 (patch)
tree87cd54ec30a256d047b474dab9266486dba20c40 /tests
parent37628e6cda8df424324042e6372d26ee7beaab7d (diff)
QNAM: Remove network connectivity pre-check
The connectivity pre-check has been around for a long time, and it has caused various issues in that time. Certain scenarios, like using certain VPN configurations, might confuse the OS into thinking you don't have and network connectivity at all and abort the connection. Especially noticeable/frustrating when the connection was going to a host inside the local network. The negative impact of this change would at worst be that we might try to connect and it will wait some amount of time before the OS tells us the connection failed in situations where it would previously have been aborted before it started. But the false-negatives are not really an OK sacrifice in that case. Fixes: QTBUG-84907 Change-Id: I37fc69051e39df3c1a1fecb56ef54521a4d3d0c3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit a0bfa4e1f8e223927cbb285bb17d1a00a5c2d4b6)
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp b/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
index b5ded86d58..65f3cbfb14 100644
--- a/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
+++ b/tests/auto/network/access/qnetworkaccessmanager/tst_qnetworkaccessmanager.cpp
@@ -84,15 +84,6 @@ void tst_QNetworkAccessManager::networkAccessible()
QNetworkAccessManager::NotAccessible);
QCOMPARE(manager.networkAccessible(), QNetworkAccessManager::NotAccessible);
- // When network is not accessible, all requests fail
- QNetworkReply *reply = manager.get(QNetworkRequest(QUrl("http://www.example.org")));
- QSignalSpy finishedSpy(reply, &QNetworkReply::finished);
- QSignalSpy errorSpy(reply, &QNetworkReply::errorOccurred);
- QVERIFY(finishedSpy.wait());
- QCOMPARE(reply->isFinished(), true);
- QCOMPARE(reply->errorString(), QStringLiteral("Network access is disabled."));
- QCOMPARE(errorSpy.count(), 1);
-
manager.setNetworkAccessible(QNetworkAccessManager::Accessible);
QCOMPARE(spy.count(), expectedCount);