summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-02-17 22:45:49 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-02-17 22:45:49 (GMT)
commit635b329592f26d64eeb6212b6056249b15293dcf (patch)
tree599b961ea9a4115178a50cd66a258182fc1febe9 /tests
parent015db206709de206dec26d8ab9536fc88ea67af6 (diff)
downloadQt-635b329592f26d64eeb6212b6056249b15293dcf.zip
Qt-635b329592f26d64eeb6212b6056249b15293dcf.tar.gz
Qt-635b329592f26d64eeb6212b6056249b15293dcf.tar.bz2
Provide a very generous timeout for QmlImageProvider test
Because it runs in an idle thread, which you would expect to be quite slow under load.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qmlimageprovider/tst_qmlimageprovider.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/declarative/qmlimageprovider/tst_qmlimageprovider.cpp b/tests/auto/declarative/qmlimageprovider/tst_qmlimageprovider.cpp
index 475cb7a..d07558a 100644
--- a/tests/auto/declarative/qmlimageprovider/tst_qmlimageprovider.cpp
+++ b/tests/auto/declarative/qmlimageprovider/tst_qmlimageprovider.cpp
@@ -44,11 +44,13 @@
#include <QtDeclarative/qmlimageprovider.h>
#include <private/qmlgraphicsimage_p.h>
+// QmlImageProvider::request() is run in an idle thread where possible
+// Be generous in our timeout.
#define TRY_WAIT(expr) \
do { \
- for (int ii = 0; ii < 6; ++ii) { \
+ for (int ii = 0; ii < 10; ++ii) { \
if ((expr)) break; \
- QTest::qWait(50); \
+ QTest::qWait(100); \
} \
QVERIFY((expr)); \
} while (false)