diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-06 13:56:34 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-06 13:57:04 (GMT) |
commit | 7cbcf8e8ef91636de1727d5bd6294a9f07c66804 (patch) | |
tree | 5a36947ea1ca5bae33619b9cb894a7ce12e1d2d9 /tests | |
parent | 15e2ecda958868b5c372bcd59cba8065c086581e (diff) | |
download | Qt-7cbcf8e8ef91636de1727d5bd6294a9f07c66804.zip Qt-7cbcf8e8ef91636de1727d5bd6294a9f07c66804.tar.gz Qt-7cbcf8e8ef91636de1727d5bd6294a9f07c66804.tar.bz2 |
tst_qhttpnetworkconnection: Some more checks
Some more checks (test still passes)
Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 16 |
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 ==="; |