diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-02-09 09:52:04 -0800 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2017-02-15 08:09:57 +0000 |
commit | cab4d495b21d1251e8dec3c0d248675c374f4131 (patch) | |
tree | db398c96f6264e5c2416a97d1d6471cd56f76b1f /tests | |
parent | b58af67d7b5f22eaf2916b91d8a7060781203561 (diff) |
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 <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/qelapsedtimer/tst_qelapsedtimer.cpp | 8 |
1 files 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 <QtCore/QElapsedTimer> #include <QtTest/QtTest> -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); } |