diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-10-17 13:54:29 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-10-17 13:54:29 +0200 |
commit | 833aabc562c51fa962f9f2da14f7cd4552dab22b (patch) | |
tree | 77e03e19385acccc04954ff42ce76655df027b5f /tests/testutils.h | |
parent | dcfc70808ab9680a8caed6ff0fb98f978fbbef97 (diff) | |
download | sink-833aabc562c51fa962f9f2da14f7cd4552dab22b.tar.gz sink-833aabc562c51fa962f9f2da14f7cd4552dab22b.zip |
dummyresourcebenchmark values
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) |