summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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)