summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@blackberry.com>2013-03-08 17:49:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-26 10:18:02 +0100
commitb96e8ff1d237e88190ac2beeaa274e5cbf9d676f (patch)
treeebde2c4b29862588783cb2c50cd45a19ae37a8be /tests
parentd0ad02a76655681c7e80084ec8caadeb9c16543c (diff)
QNetworkInterface auto test: do not abort without session
... but only if the QNetworkConfiguration manager requires one. Change-Id: I1c69c43438f1df9080d207c8598a42201f759c5b Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
index 1b64f1dd73..7780b80179 100644
--- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
+++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp
@@ -91,11 +91,14 @@ void tst_QNetworkInterface::initTestCase()
QSKIP("No network test server available");
#ifndef QT_NO_BEARERMANAGEMENT
netConfMan = new QNetworkConfigurationManager(this);
- networkConfiguration = netConfMan->defaultConfiguration();
- networkSession.reset(new QNetworkSession(networkConfiguration));
- if (!networkSession->isOpen()) {
- networkSession->open();
- QVERIFY(networkSession->waitForOpened(30000));
+ if (netConfMan->capabilities()
+ & QNetworkConfigurationManager::NetworkSessionRequired) {
+ networkConfiguration = netConfMan->defaultConfiguration();
+ networkSession.reset(new QNetworkSession(networkConfiguration));
+ if (!networkSession->isOpen()) {
+ networkSession->open();
+ QVERIFY(networkSession->waitForOpened(30000));
+ }
}
#endif
}