qt5base-lts/tests/auto/network/socket
Timur Pocheptsov c58ee54a70 tst_qtcpsocket::bind - amend the recent fix
0. The recent patch fixed the case when we can suddenly (meaning from
a particular version of Darwin) bind on a port number 1. Unfortunately,
it's not the case for IPv4 and while fixing one test case, the patch broke
another - so this patch addresses this.
1. Unfortunately, binding on a fixed port 1 on macOS made the test flaky
- we run this 'bind' several times and sometimes OS thinks port is already
bound (because of the previous test case) - closing the connection seems
to fix this problem (thus this patch do this also).
2. As a bonus a proper resource management added (aka RAII) where we would
previously leak a socket in case some QCOMPARE failed.

Fixes: QTBUG-81905
Change-Id: I90c128a332903bb44ab37de4775ca00d390dc162
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-02-22 03:36:54 +01:00
..
platformsocketengine Autotest: adapt to certain OSes always allowing binding to low ports 2020-02-13 15:11:21 -08:00
qabstractsocket Updated license headers 2016-01-21 18:55:18 +00:00
qhttpsocketengine Skip instead of fail tests when test server is not available 2020-01-14 00:15:16 +01:00
qlocalsocket Convert uses of QTime as a timer to QElapsedTimer 2019-06-14 10:42:33 +02:00
qsctpsocket Network: Use canonical license headers 2017-02-28 15:34:01 +00:00
qsocks5socketengine Skip instead of fail tests when test server is not available 2020-01-14 00:15:16 +01:00
qtcpserver Remove QOperatingSystemVersion::WindowsVista 2019-09-05 08:25:05 +02:00
qtcpsocket tst_qtcpsocket::bind - amend the recent fix 2020-02-22 03:36:54 +01:00
qudpsocket Disable debug-and-release builds for MinGW 2019-09-18 06:28:16 +00:00
socket.pro Modularize configure.json/.pri 2016-09-15 08:23:53 +00:00