sw/qa/uitest/writer_tests8/tdf145158.py | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit eb000710c54fcd6d00735bc74b0ffcc0f54c70e0 Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Sun Jun 8 21:01:47 2025 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Mon Jun 9 11:21:17 2025 +0200 workaround timing issue in UITest_writer_tests8 test_tdf145158 related to tdf#145158 - the test can fail on slow or loaded machines since initially the control has the 2pt value, so when the test tries to check whether the size is 12pt, it might do so too early and the test will fail: ====================================================================== FAIL: test_tdf145158 (tdf145158.tdf145158.test_tdf145158) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/sw/qa/uitest/writer_tests8/tdf145158.py", line 28, in test_tdf145158 self.assertEqual("12 pt", get_state_as_dict(xFontsize)['Text']) AssertionError: '12 pt' != '2 pt' - 12 pt ? - + 2 pt ---------------------------------------------------------------------- Ran 28 tests in 33.743s FAILED (failures=1, skipped=4) Tests run: 28 Tests failed: 1 Tests errors: 0 Tests skipped: 4 tearDown: calling terminate()... ...done Adding the waitUntilAllIdlesDispatched() call avoids this problem Change-Id: Ibb2aec7dfdab887ca75841e99d879402a020de3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186268 Tested-by: Jenkins Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/sw/qa/uitest/writer_tests8/tdf145158.py b/sw/qa/uitest/writer_tests8/tdf145158.py index 50ef8575da94..ed2d3bd95004 100644 --- a/sw/qa/uitest/writer_tests8/tdf145158.py +++ b/sw/qa/uitest/writer_tests8/tdf145158.py @@ -22,6 +22,9 @@ class tdf145158(UITestCase): xFontsize = xMainWindow.getChild("fontsizecombobox") + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') + xToolkit.waitUntilAllIdlesDispatched() + self.assertEqual("12 pt", get_state_as_dict(xFontsize)['Text']) select_by_text(xFontsize, "10.5 pt")