diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-06 14:24:06 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-06 14:24:51 (GMT) |
commit | 85b17ee0222d96bbd93f758ac3b2bd3139c76ec8 (patch) | |
tree | f53ec325cafe855718c2f82448d24ba0c970b7f5 /tests | |
parent | c81b79080eb8f0c956c97fc80d5118baf7703df4 (diff) | |
download | Qt-85b17ee0222d96bbd93f758ac3b2bd3139c76ec8.zip Qt-85b17ee0222d96bbd93f758ac3b2bd3139c76ec8.tar.gz Qt-85b17ee0222d96bbd93f758ac3b2bd3139c76ec8.tar.bz2 |
tst_qnetworkreply: httpConnectionCount test improvements
Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 7863b4e..7adb67f 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -3993,10 +3993,14 @@ void tst_QNetworkReply::httpConnectionCount() QTime time; time.start(); - while(pendingConnectionCount != 6) { - QCoreApplication::instance()->processEvents(); - while (server.nextPendingConnection()) + while(pendingConnectionCount <= 20) { + QTestEventLoop::instance().enterLoop(1); + QTcpSocket *socket = server.nextPendingConnection(); + while (socket != 0) { pendingConnectionCount++; + socket->setParent(&server); + socket = server.nextPendingConnection(); + } // at max. wait 10 sec if (time.elapsed() > 10000) |