diff --git a/tests/system/suite_editors/tst_basic_cpp_support/test.py b/tests/system/suite_editors/tst_basic_cpp_support/test.py
index ca06c0b4582e2c80cdb9179aafe512721674f3ab..6b31a6973be425f8123727ba44ee163caf8ecbc9 100644
--- a/tests/system/suite_editors/tst_basic_cpp_support/test.py
+++ b/tests/system/suite_editors/tst_basic_cpp_support/test.py
@@ -93,7 +93,8 @@ def main():
 #    Creator should show the declaration of the function again.
     selectFromLocator("dummy.cpp")
     mainWin = findObject(":Qt Creator_Core::Internal::MainWindow")
-    waitFor("'dummy.cpp - cplusplus-tools - ' in str(mainWin.windowTitle)")
+    if not waitFor("'dummy.cpp ' in str(mainWin.windowTitle) and ' - cplusplus-tools - ' in str(mainWin.windowTitle)", 5000):
+        test.warning("Opening dummy.cpp seems to have failed")
     # Reset cursor to the start of the document
     cursor = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget").textCursor()
     cursor.movePosition(QTextCursor.Start)