From 56337478e7e435e4ff9a301a848ba19f2a86cab6 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 18 Jul 2019 10:43:09 +0200 Subject: [PATCH] Clang: Tests: Fix flaky testCompleteProjectDependingCodeAfterChangingProject After changing the project, ensure that the project part is updated and thus the backend is notified about it, otherwise we run into a race condition. Change-Id: Iea1ff16156350d10982cfd7fac3e8e5220eb4726 Reviewed-by: Christian Stenger --- src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp b/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp index 8d3f1b54a08..cb8105a33a1 100644 --- a/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp +++ b/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp @@ -655,6 +655,7 @@ void ClangCodeCompletionTest::testCompleteProjectDependingCodeAfterChangingProje // Check completion with project configuration 2 QVERIFY(projectLoader.updateProject({{"PROJECT_CONFIGURATION_2"}})); + openEditor.waitUntilBackendIsNotified(); proposal = completionResults(openEditor.editor()); QVERIFY(!hasItem(proposal, "projectConfiguration1"));