diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-11 01:30:12 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-11 01:30:12 (GMT) |
commit | ad169b96c7dc878c556b8b5cc12b9d40233008bf (patch) | |
tree | 0ab8ff9fedf944b6a8f73c770a1b7cd168920e53 /tests | |
parent | 87652f1bfd5a7cefc90ffe1aba23c179a75cfd0d (diff) | |
download | Qt-ad169b96c7dc878c556b8b5cc12b9d40233008bf.zip Qt-ad169b96c7dc878c556b8b5cc12b9d40233008bf.tar.gz Qt-ad169b96c7dc878c556b8b5cc12b9d40233008bf.tar.bz2 |
Improve stability of tst_qmlecmascript::dynamicDestruction
Tweak timing to be more forgiving to system load.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml b/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml index ba87b32..0855b29 100644 --- a/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml +++ b/tests/auto/declarative/qmlecmascript/data/dynamicDeletion.qml @@ -10,7 +10,7 @@ MyQmlObject{ function killOther() { - obj.objectProperty.destroy(100); + obj.objectProperty.destroy(500); } function killMe() diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp index 2182ff4..e5472bb 100644 --- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp +++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp @@ -849,8 +849,12 @@ void tst_qmlecmascript::dynamicDestruction() QTest::qWait(0); QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); QVERIFY(createdQmlObject); - QTest::qWait(100); - QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + for (int ii = 0; createdQmlObject && ii < 10; ++ii) { + if (createdQmlObject) { + QTest::qWait(100); + QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + } + } QVERIFY(!createdQmlObject); QMetaObject::invokeMethod(object, "killMe"); |