qt6-bb10/tests/auto
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
..
bic/data Add binary compatibility file for 6.6.0 2023-10-17 22:23:42 +03:00
cmake Change license in test file 2024-02-14 15:23:05 +01:00
concurrent Remove extra semi-colons 2024-02-06 20:17:18 +09:00
corelib QDir: Use QT_TEST_EQUALITY_OPS macro in unit-tests 2024-02-15 14:51:37 +01:00
dbus Remove extra semi-colons 2024-02-06 20:17:18 +09:00
gui tst_QTextMarkdownWriter: test both ways of setting font characteristics 2024-02-14 18:36:42 -07:00
guiapplauncher Turn the "concentriccircles" example into snippets, update screenshot 2023-12-14 20:06:32 +01:00
network tst_QNetworkReply: Try to stabilize qtbug68821proxyError 2024-02-15 16:27:19 +01:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other Change license for tests files 2024-02-04 09:56:42 +01:00
printsupport Change license for tests files 2024-02-04 09:56:42 +01:00
shared Change license for tests files 2024-02-04 09:56:42 +01:00
sql Change license for tests files 2024-02-04 09:56:42 +01:00
testlib QTest: allow passing chrono literal as QTRY_ timeout 2024-02-07 12:15:09 +00:00
tools Change license for tests files 2024-02-04 09:56:42 +01:00
wasm wasm: Refractor Selenium manual test into auto test 2024-02-07 13:15:09 +01:00
widgets QRhiWidget: Tear down resources before window has changed 2024-02-14 18:51:29 +01:00
xml Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt wasm: Add corelib/io/qdataurl autotest 2024-02-14 18:24:39 +01:00
network-settings.h Change license for tests files 2024-02-04 09:56:42 +01:00