From cab4d495b21d1251e8dec3c0d248675c374f4131 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 9 Feb 2017 09:52:04 -0800 Subject: 50 ms isn't enough for the CI, so increase to 100 ms This should reduce the failure rate. We're still doing qSleep of the same amount of time, but we now only fail if the slip is over 100 ms. Task-number: QTBUG-58713 Change-Id: I536c32a88bff44dab37afffd14a1afdf0b2e522a Reviewed-by: Friedemann Kleint Reviewed-by: Marc Mutz --- tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp b/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp index 9db001c37d..4ee3ca361f 100644 --- a/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp +++ b/tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp @@ -31,7 +31,7 @@ #include #include -static const int minResolution = 50; // the minimum resolution for the tests +static const int minResolution = 100; // the minimum resolution for the tests QDebug operator<<(QDebug s, const QElapsedTimer &t) { @@ -107,7 +107,7 @@ void tst_QElapsedTimer::elapsed() QElapsedTimer t1; t1.start(); - QTest::qSleep(4*minResolution); + QTest::qSleep(2*minResolution); QElapsedTimer t2; t2.start(); @@ -128,8 +128,8 @@ void tst_QElapsedTimer::elapsed() QVERIFY(!t2.hasExpired(-1)); qint64 elapsed = t1.restart(); - QVERIFY(elapsed > 3*minResolution); - QVERIFY(elapsed < 5*minResolution); + QVERIFY(elapsed > minResolution); + QVERIFY(elapsed < 3*minResolution); qint64 diff = t2.msecsTo(t1); QVERIFY(diff < minResolution); } -- cgit v1.2.3