diff --git a/tests/auto/utils/async/tst_async.cpp b/tests/auto/utils/async/tst_async.cpp index bf7cae7eff1..4a496f93a00 100644 --- a/tests/auto/utils/async/tst_async.cpp +++ b/tests/auto/utils/async/tst_async.cpp @@ -439,12 +439,7 @@ void tst_Async::taskTree() }; TaskTree tree(root); - - QEventLoop eventLoop; - connect(&tree, &TaskTree::done, &eventLoop, &QEventLoop::quit); - tree.start(); - eventLoop.exec(); - + QVERIFY(tree.runBlocking(1000)); QCOMPARE(value, 16); } @@ -581,12 +576,7 @@ void tst_Async::mapReduce() QFETCH(QList, results); TaskTree tree(root); - - QEventLoop eventLoop; - connect(&tree, &TaskTree::done, &eventLoop, &QEventLoop::quit); - tree.start(); - eventLoop.exec(); - + QVERIFY(tree.runBlocking(1000)); QCOMPARE(s_results, results); QCOMPARE(s_sum, sum); }