diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-01-13 16:47:15 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-01-14 00:15:16 +0100 |
commit | eb2a7738a431a7510cdcc69250a4713c1d3cd490 (patch) | |
tree | 25cd87957bd4b46ed185ab05d3f8e6be8173ad0b /tests/manual | |
parent | 9dcbf2cf5cbdfe35637ff323fd44729badaae811 (diff) |
Skip instead of fail tests when test server is not available
We were being inconsistent in how we handled this, some tests skipping
while others using QVERIFY. It makes more sense to skip the tests, since
the problem is a missing pre-condition of the test, not the test itself
being bad or exposing real failures in the implementation.
Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/network_stresstest/tst_network_stresstest.cpp | 3 | ||||
-rw-r--r-- | tests/manual/qnetworkreply/main.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/manual/network_stresstest/tst_network_stresstest.cpp b/tests/manual/network_stresstest/tst_network_stresstest.cpp index 03df1633d5..5f2fd2b24e 100644 --- a/tests/manual/network_stresstest/tst_network_stresstest.cpp +++ b/tests/manual/network_stresstest/tst_network_stresstest.cpp @@ -123,7 +123,8 @@ void tst_NetworkStressTest::initTestCase_data() void tst_NetworkStressTest::initTestCase() { - QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); + if (!QtNetworkSettings::verifyTestNetworkSettings()) + QSKIP("No network test server available"); } void tst_NetworkStressTest::init() diff --git a/tests/manual/qnetworkreply/main.cpp b/tests/manual/qnetworkreply/main.cpp index afac7a7095..762bfe7b83 100644 --- a/tests/manual/qnetworkreply/main.cpp +++ b/tests/manual/qnetworkreply/main.cpp @@ -108,7 +108,8 @@ protected: void tst_qnetworkreply::initTestCase() { qRegisterMetaType<QNetworkReply *>(); // for QSignalSpy - QVERIFY(QtNetworkSettings::verifyTestNetworkSettings()); + if (!QtNetworkSettings::verifyTestNetworkSettings()) + QSKIP("No network test server available"); } void tst_qnetworkreply::limiting_data() |