Fix QNetworkReply test cases that use the MiniHttpServer on windows
authorShane Kearns <shane.kearns@accenture.com>
Mon, 19 Dec 2011 16:52:59 +0000 (16:52 +0000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 19 Dec 2011 18:08:57 +0000 (19:08 +0100)
The "happy eyeballs" connection code means that IPv4 and IPv6 connections
are both attempted for a http request.
For a normal http server, this is no problem, but the MiniHttpServer in
the test code is very simplistic and cannot cope with more than one
client connected at the same time.
On windows this causes all these tests to fail with timeouts.
Changed the MiniHttpServer to listen on IPv4 only instead of Any address.

Change-Id: I81e249997d894d266001da474a351b1f5642599e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp

index d3b92ea..e900a25 100644 (file)
@@ -463,7 +463,7 @@ public:
         if (useipv6) {
             listen(QHostAddress::AnyIPv6);
         } else {
-            listen();
+            listen(QHostAddress::AnyIPv4);
         }
         if (thread) {
             connect(thread, SIGNAL(started()), this, SLOT(threadStartedSlot()));