summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-28 05:14:05 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-07-28 05:14:05 (GMT)
commit289f9a97c3828135bdc2fd6b3e8466c1c970a5c5 (patch)
tree5ad2c7a04162ec32d8e674eee89fbf48f3bd4a07 /tests/auto
parentb65e9811968ec2e122b0e7f6b9a58dce50e3c01c (diff)
parent9814b2225b70d6b2f758e9dbe98f8e1662049b37 (diff)
downloadQt-289f9a97c3828135bdc2fd6b3e8466c1c970a5c5.zip
Qt-289f9a97c3828135bdc2fd6b3e8466c1c970a5c5.tar.gz
Qt-289f9a97c3828135bdc2fd6b3e8466c1c970a5c5.tar.bz2
Merge commit '9814b2225b70d6b2f758e9dbe98f8e1662049b37' into oslo-staging-1
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
index 24f6e52..3388cd5 100644
--- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -88,7 +88,7 @@ private slots:
void sessionStop();
void roamingErrorCodes();
-
+
void sessionProperties_data();
void sessionProperties();
@@ -918,6 +918,10 @@ void tst_QNetworkSession::sessionOpenCloseStop()
session.waitForOpened();
#endif
+ // Wait until the configuration is uptodate as well, it may be signaled 'connected'
+ // bit later than the session
+ QTRY_VERIFY(configuration.state() == QNetworkConfiguration::Active);
+
if (session.isOpen())
QVERIFY(!sessionOpenedSpy.isEmpty() || !errorSpy.isEmpty());
if (!errorSpy.isEmpty()) {
@@ -1131,8 +1135,9 @@ void tst_QNetworkSession::sessionOpenCloseStop()
roamedSuccessfully = true;
} else if (state == QNetworkSession::Closing) {
QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);
- QTRY_VERIFY(session.state() == QNetworkSession::Connected);
- roamedSuccessfully = true;
+ QTRY_VERIFY(session.state() == QNetworkSession::Connected ||
+ session.state() == QNetworkSession::Disconnected);
+ roamedSuccessfully = false;
} else if (state == QNetworkSession::Disconnected) {
QTRY_VERIFY(!errorSpy.isEmpty());
QTRY_VERIFY(session2.state() == QNetworkSession::Disconnected);