diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-21 14:32:41 +0100 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-02-21 14:38:29 +0100 |
commit | f5a39274f50178a4ec033b35f954f8e861afce70 (patch) | |
tree | e3b2070aefbc2999a9c7da207ffe9cb088976d11 /tests/auto/qtimer | |
parent | 9dd254f668392f2402f9f3b342f01b6620e11158 (diff) | |
download | qt4-tools-f5a39274f50178a4ec033b35f954f8e861afce70.tar.gz |
Stabilize tst_qtimer
Using QTRY_VERIFY
We should wait more if the timer events did not get received in time
because the system was busy.
Diffstat (limited to 'tests/auto/qtimer')
-rw-r--r-- | tests/auto/qtimer/tst_qtimer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp index 6cff7c5399..c2acc1856f 100644 --- a/tests/auto/qtimer/tst_qtimer.cpp +++ b/tests/auto/qtimer/tst_qtimer.cpp @@ -50,6 +50,8 @@ #include <unistd.h> #endif +#include "../../shared/util.h" + //TESTED_CLASS= //TESTED_FILES= @@ -272,9 +274,9 @@ void tst_QTimer::livelock() QFETCH(int, interval); LiveLockTester tester(interval); QTest::qWait(180); // we have to use wait here, since we're testing timers with a non-zero timeout - QCOMPARE(tester.timeoutsForFirst, 1); + QTRY_COMPARE(tester.timeoutsForFirst, 1); QCOMPARE(tester.timeoutsForExtra, 0); - QCOMPARE(tester.timeoutsForSecond, 1); + QTRY_COMPARE(tester.timeoutsForSecond, 1); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (QSysInfo::WindowsVersion < QSysInfo::WV_XP) QEXPECT_FAIL("non-zero timer", "Multimedia timers are not available on Windows 2000", Continue); @@ -724,7 +726,7 @@ void tst_QTimer::QTBUG13633_dontBlockEvents() { DontBlockEvents t; QTest::qWait(60); - QVERIFY(t.total > 2); + QTRY_VERIFY(t.total > 2); } class SlotRepeater : public QObject { |