qt6-bb10/tests/auto/network
Mårten Nordheim 775a57f266 tst_QNetworkReply: Try to stabilize qtbug68821proxyError
The test is a bit silly, it was originally written to make sure that
we produce meaningful errors when trying to connect to a proxy server
where the connection is refused or the server doesn't respond at all.

To test that, it creates a local QTcpServer and starts listening to any
free port (by specifying port 0) and then it closed the server and
uses the address-port of localhost:serverPort as the proxy to use, since
we know it _was_ unused, since we were able to bind to it.

However, just calling close() doesn't immediately tear down the internal
socket descriptor, so the OS may still have the port reserved for
some time.

By moving the QTcpServer to a narrower scope we will quickly destroy it
and the internal socket engine, which is parented to the server, and
this in turn releases the socket descriptor.

Pick-to: 6.7 6.6 6.5
Change-Id: If12128fc21d1f545df152f08f0d52c1b14ac6037
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-02-15 16:27:19 +01:00
..
access tst_QNetworkReply: Try to stabilize qtbug68821proxyError 2024-02-15 16:27:19 +01:00
kernel Change license for tests files 2024-02-04 09:56:42 +01:00
selftest Change license for tests files 2024-02-04 09:56:42 +01:00
socket Remove extra semi-colons 2024-02-06 20:17:18 +09:00
ssl Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt Rid of 'special case' markers 2023-04-13 18:30:58 +02:00