From 7cbcf8e8ef91636de1727d5bd6294a9f07c66804 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 6 Oct 2009 15:56:34 +0200 Subject: tst_qhttpnetworkconnection: Some more checks Some more checks (test still passes) Reviewed-by: TrustMe --- .../tst_qhttpnetworkconnection.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 6036a14..7aab6de 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -899,9 +899,21 @@ void tst_QHttpNetworkConnection::getMultipleWithPipeliningAndMultiplePriorities( } while (finishedCount != replies.length()); - // redundant - for (int i = 0; i < replies.length(); i++) + int pipelinedCount = 0; + for (int i = 0; i < replies.length(); i++) { QVERIFY(replies.at(i)->isFinished()); + QVERIFY (!(replies.at(i)->request().isPipeliningAllowed() == false + && replies.at(i)->isPipeliningUsed())); + + if (replies.at(i)->isPipeliningUsed()) + pipelinedCount++; + } + + // We allow pipelining for every 2nd,3rd,4th,6th,8th,9th,10th etc request. + // Assume that half of the requests had been pipelined. + // (this is a very relaxed condition, when last measured 79 of 100 + // requests had been pipelined) + QVERIFY(pipelinedCount >= requestCount / 2); qDebug() << "===" << stopWatch.elapsed() << "msec ==="; -- cgit v0.12