summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-05-19 10:37:15 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-05-19 17:42:24 +0000
commitc4addd221e97f3b17094d514859f4ea518979c20 (patch)
tree8ebed475c5a25d7a3d2afea6753e3b83db2f1a22 /tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
parent9301d485430daaf39cbcfe70d4223d4afe7037c8 (diff)
tst_QTimer::timeout(): Use QTRY_VERIFY_WITH_TIMEOUT
The test has been observed to be flaky on Windows. Introduce QTRY_VERIFY_WITH_TIMEOUT for diagnostics. Change-Id: I72abdd2e5544f8f35199876486ab15151f60e5f2 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp')
-rw-r--r--tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
index 3c2989831e..d2035a088e 100644
--- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
+++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
@@ -144,12 +144,10 @@ void tst_QTimer::timeout()
QCOMPARE(helper.count, 0);
- QTest::qWait(TIMEOUT_TIMEOUT);
- QVERIFY(helper.count > 0);
+ QTRY_VERIFY_WITH_TIMEOUT(helper.count > 0, TIMEOUT_TIMEOUT);
int oldCount = helper.count;
- QTest::qWait(TIMEOUT_TIMEOUT);
- QVERIFY(helper.count > oldCount);
+ QTRY_VERIFY_WITH_TIMEOUT(helper.count > oldCount, TIMEOUT_TIMEOUT);
}
void tst_QTimer::remainingTime()