qt5base-lts/tests/auto/corelib/kernel/qsocketnotifier
Thiago Macieira 93b87b5cbf QSocketNotifier: firm up the ordering in unexpectedDisconnection()
The test was relying on the fact that, having written 1 byte to both
writeEnd1 and writeEnd2 (and ensured those bytes were written with
waitForBytesWritten()), both read ends would be activated by the next
event loop. It turns out that this was an unreliable assumption, because
the processing of that 1 byte on the second socket may not have happened
yet. So firm up by waiting that both read ends are readable before even
creating the QSocketNotifiers we will read on.

I'm not entirely sure what this test is attempting to test. Its
documentation says it's testing a QAbstractSocket condition, but the
read ends aren't QAbstractSocket (this test should have been in
tst_QAbstractSocket if so). It may be testing the condition that caused
that QAbstractSocket behavior, but that wouldn't be a good test.

Drive-by remove redundant flush()-after-waitForBytesWritten() calls.

Fixes: QTBUG-115154
Pick-to: 6.5 6.6
Change-Id: I61b74deaf2514644a24efffd17708f8071f707ed
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-07-11 13:44:29 -07:00
..
.gitignore Moving relevant tests to corelib/kernel 2011-09-01 12:42:14 +02:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qsocketnotifier.cpp QSocketNotifier: firm up the ordering in unexpectedDisconnection() 2023-07-11 13:44:29 -07:00