diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-07-26 02:48:44 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-07-28 04:42:55 (GMT) |
commit | 34691d27d03abc0c8f940b4a0a3cda4cd308642e (patch) | |
tree | 67d860064a771527c54fb88ec0ce2fbb07d83815 /tests/auto/qnetworksession | |
parent | c16f0a839743af36b36aea9c35f0d5ddfda3d6ac (diff) | |
download | Qt-34691d27d03abc0c8f940b4a0a3cda4cd308642e.zip Qt-34691d27d03abc0c8f940b4a0a3cda4cd308642e.tar.gz Qt-34691d27d03abc0c8f940b4a0a3cda4cd308642e.tar.bz2 |
Cherry pick fix for MOBILITY-1194 from Qt Mobility.
2f582953ecfc53f217317f58e4fc75b5b51a1126
Diffstat (limited to 'tests/auto/qnetworksession')
-rw-r--r-- | tests/auto/qnetworksession/test/tst_qnetworksession.cpp | 11 |
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); |