93b87b5cbf
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> |
||
---|---|---|
.. | ||
auto | ||
baseline | ||
benchmarks | ||
global | ||
libfuzzer | ||
manual | ||
shared | ||
testserver | ||
CMakeLists.txt | ||
README |
This directory contains autotests and benchmarks based on Qt Test. In order to run the autotests reliably, you need to configure a desktop to match the test environment that these tests are written for. Linux X11: * The user must be logged in to an active desktop; you can't run the autotests without a valid DISPLAY that allows X11 connections. * The tests are run against a KDE3 or KDE4 desktop. * Window manager uses "click to focus", and not "focus follows mouse". Many tests move the mouse cursor around and expect this to not affect focus and activation. * Disable "click to activate", i.e., when a window is opened, the window manager should automatically activate it (give it input focus) and not wait for the user to click the window.