From 82b3e65875fe018c2571d83dabe87bb396e8b60a Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 13 Jan 2010 14:23:14 +0100 Subject: 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 --- tests/benchmarks/qnetworkreply/tst_qnetworkreply.cpp | 8 ++++---- 1 file 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(); } -- cgit v0.12