From ca206bceaff3667469986402e6143bf4c666b228 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Wed, 11 Dec 2019 16:39:42 +0100 Subject: QQuickWorkerScript: avoid arbitrary delay Change-Id: Iae4af147488f4d770ee3bc12b1e231425c5a5d6f Reviewed-by: Simon Hausmann --- tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/auto/qml/qquickworkerscript/tst_qquickworkerscript.cpp') 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(); -- cgit v1.2.3