diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-06 14:24:06 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-10-07 03:02:20 (GMT) |
commit | 137d200704b31e3488fc9580e936eb17e9dc9793 (patch) | |
tree | e2bf39567fb1f2991018cebfbaa92cf5f4d82233 | |
parent | c7ebbfeed10ad2e1508582a42290e31cb8205b76 (diff) | |
download | Qt-137d200704b31e3488fc9580e936eb17e9dc9793.zip Qt-137d200704b31e3488fc9580e936eb17e9dc9793.tar.gz Qt-137d200704b31e3488fc9580e936eb17e9dc9793.tar.bz2 |
tst_qnetworkreply: httpConnectionCount test improvements
Reviewed-by: TrustMe
(cherry picked from commit 85b17ee0222d96bbd93f758ac3b2bd3139c76ec8)
-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) |