summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-01-13 13:23:14 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-01-13 13:23:14 (GMT)
commit82b3e65875fe018c2571d83dabe87bb396e8b60a (patch)
treeb94e508bb2b8ef210c5333ef18bd5526825f8e1b /tests
parent6e5b5305a07d89e67d7867f150283476bcf1f72c (diff)
downloadQt-82b3e65875fe018c2571d83dabe87bb396e8b60a.zip
Qt-82b3e65875fe018c2571d83dabe87bb396e8b60a.tar.gz
Qt-82b3e65875fe018c2571d83dabe87bb396e8b60a.tar.bz2
tst_qnetworkreply benchmark: Properly finish the thread
End the thread at the proper point, before possibly failing one of the test conditions. Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
index edaf545..6327123 100644
--- a/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp
@@ -561,15 +561,15 @@ void tst_qnetworkreply::httpUploadPerformance()
generator.start();
time.start();
QTestEventLoop::instance().enterLoop(40);
+ qint64 elapsed = time.elapsed();
+ reader.exit();
+ reader.wait();
+ QVERIFY(reply->isFinished());
QCOMPARE(reply->error(), QNetworkReply::NoError);
QVERIFY(!QTestEventLoop::instance().timeout());
- qint64 elapsed = time.elapsed();
qDebug() << "tst_QNetworkReply::httpUploadPerformance" << elapsed << "msec, "
<< ((UploadSize/1024.0)/(elapsed/1000.0)) << " kB/sec";
-
- reader.exit();
- reader.wait();
}