Increase the fuzziness of the QSemaphore test to 50 ms
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 12 Sep 2012 12:55:09 +0000 (14:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 13 Sep 2012 20:40:27 +0000 (22:40 +0200)
The test tries to acquire a semaphore that isn't ready, so it will
timeout. The test is working properly.

The only problem is that 10 ms is too strict. For a wide variety of
reasons, especially since the Qt CI system runs multiple tests in
parallel, the program may not run again in that 10 ms window.

Change-Id: Ic0f684895f73646db5f1cc783fe9ef75fb1ab02b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp

index 884e871..597178f 100644 (file)
@@ -225,7 +225,7 @@ void tst_QSemaphore::tryAcquireWithTimeout()
 
     // timers are not guaranteed to be accurate down to the last millisecond,
     // so we permit the elapsed times to be up to this far from the expected value.
-    int fuzz = 10;
+    int fuzz = 50;
 
     QSemaphore semaphore;
     QTime time;