summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhttpnetworkconnection
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-10-06 15:56:34 +0200
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-10-06 15:57:04 +0200
commit7cbcf8e8ef91636de1727d5bd6294a9f07c66804 (patch)
tree5a36947ea1ca5bae33619b9cb894a7ce12e1d2d9 /tests/auto/qhttpnetworkconnection
parent15e2ecda958868b5c372bcd59cba8065c086581e (diff)
tst_qhttpnetworkconnection: Some more checks
Some more checks (test still passes) Reviewed-by: TrustMe
Diffstat (limited to 'tests/auto/qhttpnetworkconnection')
-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 6036a14e56..7aab6de31f 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 ===";