summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkreply
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-10-06 16:24:06 +0200
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-10-06 16:24:51 +0200
commit85b17ee0222d96bbd93f758ac3b2bd3139c76ec8 (patch)
treef53ec325cafe855718c2f82448d24ba0c970b7f5 /tests/auto/qnetworkreply
parentc81b79080eb8f0c956c97fc80d5118baf7703df4 (diff)
tst_qnetworkreply: httpConnectionCount test improvements
Reviewed-by: TrustMe
Diffstat (limited to 'tests/auto/qnetworkreply')
-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)