summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-10-14 14:51:16 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-17 14:23:19 +0000
commitac384524c8fa6b19153811e2eaf6dac6b911f930 (patch)
treedfed06ed78db59a0a30a4e49f6f44d4fef44ba80 /tests
parent658c8370e4dd74ee82046799b56947bb3c738b92 (diff)
Speculative fix for tst_QThread::wait2() flakiness
This test fails on Windows occasionally with values just short of 800, the lowest observed being 791. It is probably rounding somehow to 10ms segments, so allow it to be up to 10 ms too fast. Change-Id: Ie28e9f61588b68a9060a006f78eedc3a26d05155 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index 3230472d5b..d7294c3ee6 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -1082,8 +1082,8 @@ void tst_QThread::wait2()
thread.start();
timer.start();
QVERIFY(!thread.wait(Waiting_Thread::WaitTime));
- qint64 elapsed = timer.elapsed(); // On Windows, we sometimes get (WaitTime - 1).
- QVERIFY2(elapsed >= Waiting_Thread::WaitTime - 1, qPrintable(QString::fromLatin1("elapsed: %1").arg(elapsed)));
+ qint64 elapsed = timer.elapsed(); // On Windows, we sometimes get (WaitTime - 9).
+ QVERIFY2(elapsed >= Waiting_Thread::WaitTime - 10, qPrintable(QString::fromLatin1("elapsed: %1").arg(elapsed)));
timer.start();
thread.cond1.wakeOne();