Go to file
Jarek Kobus db3d5a3097 Fix flaky QTimer::remainingTime() test
Before, we used not so accurate QTest::qWait(50)
to measure the accuracy of more precise timer's interval.
In addition, the checked range for remainingTime (50, 200)
was probably wrong, since by definition it couldn't be more than 150,
as we started the timer with interval of 200 and waited at least 50.

In this fix we have additional "tester" timer to measure remainingTime
of "tested" timer. The "tester" is a singleShot timer with interval of
50, and is started together with "tested" timer. Whenever the "tested"
timer timeouts, it restarts the "tester" timer - this is done desired
number of times (2 by default, like in the original test).

The test itself lies now inside tester's lambda. We fix the tested
range (at least 1, no more than 150). The minimum value could in
theory be greater, but it's enough to test that it's not overdue.

Finally, we wait for expected number of test runs. We give it twice
as much time as is in theory needed.

Task-number: QTBUG-83419
Task-number: QTBUG-58519
Change-Id: I43836d787d804f22bb66515ebb215d040189c4f3
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-09-10 02:49:59 +02:00
.github/workflows GitHub Actions: Fix actions build 2020-08-14 21:40:28 +02:00
bin Windows: Avoid syncqt needlessly re-generating headers 2020-08-19 12:46:09 +02:00
cmake CMake: Fix qt_apply_rpaths not erroring out when no target is given 2020-09-09 18:53:49 +02:00
coin CMake: Use CMAKE_AUTOGEN_VERBOSE to see moc invocations 2020-07-24 17:33:17 +02:00
config.tests CMake: Skip regeneration of manual compile test project 2020-04-09 11:26:46 +02:00
dist Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
doc Doc: Fix documentation warnings for Qt GUI 2020-08-28 11:37:35 +02:00
examples Deliver Quit event when calling QCoreApplication::quit() 2020-09-07 14:41:16 +02:00
lib
mkspecs qmake: Do not pass -mthreads to Clang 2020-08-28 12:58:04 +03:00
qmake Use QList instead of QVector in qmake 2020-09-05 07:07:44 +02:00
src TLS utils - move runtime check to compile time 2020-09-09 21:53:37 +02:00
tests Fix flaky QTimer::remainingTime() test 2020-09-10 02:49:59 +02:00
util Round float->qfloat16 to even 2020-09-06 12:35:12 +02:00
.cmake.conf pro2cmake.py: Generate .cmake.conf files for versioning 2020-04-30 17:44:03 +00:00
.gitattributes
.gitignore Remove the QPF2 font engine 2020-08-24 07:08:45 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.prev_qt_cmdline.cmake CMake: Re-implement configure/qmake's command line handling in CMake 2020-08-17 08:08:20 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag
CMakeLists.txt CMake: Fix tst_moc to build when tests are built as part of Qt tree 2020-08-23 11:04:20 +02:00
config_help.txt Make -qtlibinfix affect the names of plugins by default 2020-07-13 20:30:18 +02:00
configure CMake: Fix configure -redo on Unix 2020-08-20 17:07:09 +02:00
configure.bat CMake: Fix top-level configure 2020-07-16 15:00:37 +02:00
configure.cmake CMake: Implement configure -gdb-index 2020-08-23 11:05:01 +02:00
configure.json Remove Qt 5.1 binary-compatibility warning 2020-08-18 12:55:38 +02:00
configure.pri Treat -xplatform or -device-option as being a cross compilation 2020-07-08 19:18:09 +02:00
dependencies.yaml Re-add dependencies.yaml so repos outside qt5 can be built with Coin 2019-09-19 17:07:36 +00:00
header.BSD
header.COMM
header.FDL
header.GPL
header.GPL-EXCEPT
header.LGPL
header.LGPL3
header.LGPL3-COMM
header.LGPL-NOGPL2
header.LGPL-ONLY
header.MIT
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.LGPL3
LICENSE.LGPLv3
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qt_cmdline.cmake CMake: Re-implement configure/qmake's command line handling in CMake 2020-08-17 08:08:20 +02:00
qtbase.pro Update qmake before building src 2020-08-19 18:25:51 +02:00
sync.profile Remove last remaining bits of QtPlatformHeaders 2020-08-04 07:12:32 +02:00