From c532076bfdf700a1861f419859adcd05638ac61e Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Thu, 14 Jan 2021 02:07:56 +0100 Subject: [PATCH] qmljs: fix tst_dependencies Fixed the dependencies test. Now it makes sure that all dependencies are loaded before evaluating the checks, otherwise a race condition in the link process (QTCREATORBUG-25240) might give problems. This requires running the event loop to ensure that the invokeMethod in PluginDumper::loadPluginTypes creates the futures in the model manager. Change-Id: I4c0dd5cc948917e2a74fd46c3b66ee3bb5370da4 Reviewed-by: Ulf Hermann --- tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp b/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp index 3139e6feca5..5b6767151f3 100644 --- a/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp +++ b/tests/auto/qml/codemodel/dependencies/tst_dependencies.cpp @@ -151,7 +151,9 @@ void tst_Dependencies::test() lPaths.maybeInsert(Utils::FilePath::fromString(p), Dialect::Qml); ModelManagerInterface::importScan(result, ModelManagerInterface::workingCopy(), lPaths, ModelManagerInterface::instance(), false); - + QCoreApplication::processEvents(); + ModelManagerInterface::instance()->test_joinAllThreads(); + QCoreApplication::processEvents(); TestData data = testData(filename); Document::MutablePtr doc = data.doc; int nExpectedSemanticMessages = data.semanticMessages;