aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2019-12-11 16:39:42 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2019-12-11 16:43:09 +0100
commitca206bceaff3667469986402e6143bf4c666b228 (patch)
tree2034e188f1b6dccb5a9341d50ab854935f30e3a1 /tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
parentd07a5221ce0a138743341e2edeaba6f8488f42f7 (diff)
QQuickWorkerScript: avoid arbitrary delay
Change-Id: Iae4af147488f4d770ee3bc12b1e231425c5a5d6f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp')
-rw-r--r--tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
index 1ace13a3fa..122e14a633 100644
--- a/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
+++ b/tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp
@@ -113,10 +113,7 @@ void tst_QQuickWorkerScript::ready()
const QMetaObject *mo = worker->metaObject();
- // Give the component some time to become ready
- QTest::qSleep(1000);
-
- QVERIFY(worker->ready());
+ QTRY_VERIFY(worker->ready());
QVariant readyChangedCalled = mo->property(mo->indexOfProperty("readyChangedCalled")).read(worker.data()).value<QVariant>();