summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-10-06 16:24:06 +0200
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-07 13:02:20 +1000
commit137d200704b31e3488fc9580e936eb17e9dc9793 (patch)
treee2bf39567fb1f2991018cebfbaa92cf5f4d82233 /tests
parentc7ebbfeed10ad2e1508582a42290e31cb8205b76 (diff)
tst_qnetworkreply: httpConnectionCount test improvements
Reviewed-by: TrustMe (cherry picked from commit 85b17ee0222d96bbd93f758ac3b2bd3139c76ec8)
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 7863b4ea94..7adb67f115 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)