diff options
Diffstat (limited to 'tests/testutils.h')
-rw-r--r-- | tests/testutils.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/testutils.h b/tests/testutils.h index 6e935f3..f464e76 100644 --- a/tests/testutils.h +++ b/tests/testutils.h | |||
@@ -46,10 +46,15 @@ do {\ | |||
46 | return;\ | 46 | return;\ |
47 | } while (0) | 47 | } while (0) |
48 | 48 | ||
49 | //qWait(1) seems to simply skip waiting at all. | ||
49 | #define QUICK_TRY_VERIFY(statement) \ | 50 | #define QUICK_TRY_VERIFY(statement) \ |
50 | do {\ | 51 | do {\ |
51 | static int timeout = 5000; \ | 52 | static int timeout = 2500; \ |
52 | for (int i = 0; i < timeout && #statement; i++) { \ | 53 | int i = 0; \ |
53 | QTest::qWait(1); \ | 54 | for (; i < timeout && !(statement); i++) { \ |
55 | QTest::qWait(2); \ | ||
56 | } \ | ||
57 | if (i >= timeout) { \ | ||
58 | qWarning() << "Timeout during QUICK_TRY_VERIFY"; \ | ||
54 | } \ | 59 | } \ |
55 | } while (0) | 60 | } while (0) |