diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-09-07 14:29:01 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-09-07 14:32:52 (GMT) |
commit | 87f023a692d5b469f6c8f796c8cf217057e92813 (patch) | |
tree | 86d9d35d2312399ecc8cbcf6f3ed1075796b8238 /tests/auto/qnetworkreply | |
parent | 0f4c89bc38e124a8b308f25754e84642194cc2a6 (diff) | |
download | Qt-87f023a692d5b469f6c8f796c8cf217057e92813.zip Qt-87f023a692d5b469f6c8f796c8cf217057e92813.tar.gz Qt-87f023a692d5b469f6c8f796c8cf217057e92813.tar.bz2 |
tst_qnetworkreply: Check for NoError before event loop timeout.
This makes sure we show a proper "Host not found" error instead of
the "Event loop timed out".
Rev-By: Peter Hartmann
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index a223d1c..7c70819 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2653,6 +2653,7 @@ void tst_QNetworkReply::ioPutToFileFromSocket() connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(10); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); @@ -2699,6 +2700,7 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket() connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); QTestEventLoop::instance().enterLoop(10); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); @@ -2971,6 +2973,7 @@ void tst_QNetworkReply::ioPostToHttpFromSocket() this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); disconnect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), url); @@ -3295,6 +3298,7 @@ void tst_QNetworkReply::uploadPerformance() QTimer::singleShot(5000, &generator, SLOT(stop())); QTestEventLoop::instance().enterLoop(10); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); } @@ -3320,6 +3324,7 @@ void tst_QNetworkReply::httpUploadPerformance() generator.start(); time.start(); QTestEventLoop::instance().enterLoop(40); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); qint64 elapsed = time.elapsed(); @@ -3387,6 +3392,7 @@ void tst_QNetworkReply::httpDownloadPerformance() QTime time; time.start(); QTestEventLoop::instance().enterLoop(40); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); qint64 elapsed = time.elapsed(); @@ -3456,6 +3462,7 @@ void tst_QNetworkReply::downloadProgress() spy.clear(); QTestEventLoop::instance().enterLoop(2); + QCOMPARE(reply->error(), QNetworkReply::NoError); QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(spy.count() > 0); QVERIFY(!reply->isRunning()); |