diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2012-02-06 14:17:08 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-08 02:10:51 +0100 |
commit | 3ae3aa0e51711ea4051c82ed7911ccc744f44268 (patch) | |
tree | d553eaaf12f625b490335ab12a44dbc149a625de /config.tests/unix | |
parent | f50a84008eb24d164df4e375084df457e9c85ce7 (diff) |
Improved stability of tst_qsemaphore (especially on mac)
Timers are not entirely precise; if we ask for a timeout of
10000 milliseconds, we might time out in 9999 instead.
Also, we know the expected elapsed time in each case, so do a fuzzy
comparison against that time.
Previously the test was verifying that the elapsed time was greater than
or equal to the timeout in the case where a timeout was expected, which
means the test would not detect bugs which incorrectly caused the
timeout to occur later than it should.
(cherry picked from qt4 commit 9a2573dc13b3e8df6cd15bef64370ea407480fc7)
Change-Id: I91d0c81f989ab43a3c48f6abbb4c5b28e2b35402
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'config.tests/unix')
0 files changed, 0 insertions, 0 deletions