qt6-bb10/tests/auto/network/access
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
..
hpack Change license for tests files 2024-02-04 09:56:42 +01:00
hsts Change license for tests files 2024-02-04 09:56:42 +01:00
http2 Change license for tests files 2024-02-04 09:56:42 +01:00
qabstractnetworkcache Change license for tests files 2024-02-04 09:56:42 +01:00
qdecompresshelper Change license for tests files 2024-02-04 09:56:42 +01:00
qhttp2connection Change license for tests files 2024-02-04 09:56:42 +01:00
qhttpheaderparser Change license for tests files 2024-02-04 09:56:42 +01:00
qhttpheaders Change license for tests files 2024-02-04 09:56:42 +01:00
qhttpnetworkconnection Change license for tests files 2024-02-04 09:56:42 +01:00
qhttpnetworkreply Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkaccessmanager Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkcachemetadata Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkcookie Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkcookiejar Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkdiskcache Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkreply tst_QNetworkReply: Try to stabilize qtbug68821proxyError 2024-02-15 16:27:19 +01:00
qnetworkrequest Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkrequestfactory Add QNetworkRequestFactory::(set)?Priority 2024-02-08 11:38:10 +01:00
qrestaccessmanager Remove HTTP 1XX status test from tst_qrestaccessmanager 2024-02-06 19:10:45 +02:00
CMakeLists.txt Privately introduce QHttp2Connection 2024-01-17 16:05:25 +01:00