qt6-bb10/tests/auto/corelib/thread/qsemaphore
Rohan McGovern 3ae3aa0e51 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>
2012-02-08 02:10:51 +01:00
..
.gitignore Moving relevant tests to corelib/thread 2011-09-01 12:54:58 +02:00
qsemaphore.pro Improved stability of tst_qsemaphore (especially on mac) 2012-02-08 02:10:51 +01:00
tst_qsemaphore.cpp Improved stability of tst_qsemaphore (especially on mac) 2012-02-08 02:10:51 +01:00