summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-10-06 13:56:34 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-07 03:01:24 (GMT)
commit444172c5a82ad584b7e466f12d27f49daf182992 (patch)
tree87000cea90e686ec96d5174e71715b434929887c /tests
parent9047e5ad08d0185dec73d8ee1928a952989a9a61 (diff)
downloadQt-444172c5a82ad584b7e466f12d27f49daf182992.zip
Qt-444172c5a82ad584b7e466f12d27f49daf182992.tar.gz
Qt-444172c5a82ad584b7e466f12d27f49daf182992.tar.bz2
tst_qhttpnetworkconnection: Some more checks
Some more checks (test still passes) Reviewed-by: TrustMe (cherry picked from commit 7cbcf8e8ef91636de1727d5bd6294a9f07c66804)
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp16
1 files 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 ===";