qt5base-lts/tests/auto/corelib/thread
Jarek Kobus 225cc60954 Fix flaky QFutureWatcher::startFinish() test
Since waiting for a spy employs polling, it may happen
that while waiting for a startedSpy we had received already
a signal for finishedSpy. This explains current flakiness.

The fix is to connect to lambdas instead and update
the hit count accordingly. Inside lambdas we also
ensure the correct order for started / finised signals.

After waitForFinished() unblocks we ensure that possible
pending asynchronous signals (started / finished) are processed
and check the final state.

Task-number: QTBUG-83076
Change-Id: I16963ef9c011cb613d7b409d3e3032303a942336
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-09-03 20:45:00 +02:00
..
qatomicint Disable warning about self-move and self-assign-overload 2020-07-26 18:06:34 +02:00
qatomicinteger CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qatomicpointer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qfuture Fix QFuture::waitForFinished to wait until QFuture is started 2020-08-26 16:37:43 +02:00
qfuturesynchronizer CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qfuturewatcher Fix flaky QFutureWatcher::startFinish() test 2020-09-03 20:45:00 +02:00
qmutex Replace Qt CONSTEXPR defines with constexpr 2020-08-14 15:52:58 +02:00
qmutexlocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qpromise Fix QFuture::waitForFinished to wait until QFuture is started 2020-08-26 16:37:43 +02:00
qreadlocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qreadwritelock CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qresultstore CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qsemaphore CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qthread CMake: Properly handle CONFIG += thread aka Threads::Threads 2020-08-06 19:15:39 +02:00
qthreadonce CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qthreadpool CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qthreadstorage CMake: Properly handle CONFIG += thread aka Threads::Threads 2020-08-06 19:15:39 +02:00
qwaitcondition CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
qwritelocker CMake: Regenerate tests with new qt_ prefixed APIs 2020-07-09 09:38:35 +02:00
.prev_CMakeLists.txt CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
CMakeLists.txt CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
thread.pro Add QPromise implementation 2020-06-09 17:21:38 +03:00