qt6-bb10/tests/auto/network/socket/qtcpsocket
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
..
stressTest Add cmdline feature to qmake 2019-02-18 07:12:14 +00:00
test Migrate Windows system libs to external dependencies 2019-05-08 08:30:02 +00:00
.gitignore
BLACKLIST QTcpSocket::bind: fix issue found by BLACKLIST 2020-02-13 15:11:11 -08:00
qtcpsocket.pro tst_QTcpSocket::suddenRemoteDisconnect - fix flakyness 2017-10-30 11:10:10 +00:00
tst_qtcpsocket.cpp tst_qtcpsocket::bind - amend the recent fix 2020-02-22 03:36:54 +01:00