From d0e4f657c9810f8f938b14b61c8b27fd6a070547 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 16 Nov 2018 09:59:55 +0100 Subject: [PATCH] Squish: Adapt tst_git_local Committing has been made a 'bit less synchronous'. So, wait a short amount of time to have the expected output present, but fail if it does not appear within that time frame. Change-Id: I5f6c02dcec42800e876a4bae36e08596bedf0049 Reviewed-by: Robert Loehning --- tests/system/suite_tools/tst_git_local/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/system/suite_tools/tst_git_local/test.py b/tests/system/suite_tools/tst_git_local/test.py index 72943b3eb2e..cd9fed32e18 100644 --- a/tests/system/suite_tools/tst_git_local/test.py +++ b/tests/system/suite_tools/tst_git_local/test.py @@ -46,8 +46,9 @@ def commit(commitMessage, expectedLogMessage, uncheckUntracked=False): checkOrFixCommitterInformation('invalidEmailLabel', 'emailLineEdit', 'nobody@nowhere.com') clickButton(waitForObject(":splitter.Commit File(s)_VcsBase::QActionPushButton")) vcsLog = waitForObject("{type='QPlainTextEdit' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}").plainText - test.verify(expectedLogMessage in str(vcsLog), "Searching for '%s' in log:\n%s " % (expectedLogMessage, vcsLog)) + "window=':Qt Creator_Core::Internal::MainWindow'}") + test.verify(waitFor('expectedLogMessage in str(vcsLog.plainText)', 2000), + "Searching for '%s' in log:\n%s " % (expectedLogMessage, vcsLog.plainText)) return commitMessage def verifyItemsInGit(commitMessages):