[Libreoffice-commits] core.git: sc/qa sd/qa sw/qa uitest/uitest

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sun Mar 24 17:40:27 UTC 2019


 sc/qa/uitest/calc_tests6/autocorrectOptions.py   |    3 ++-
 sd/qa/uitest/impress_tests/autocorrectOptions.py |    3 ++-
 sw/qa/uitest/writer_tests5/autocorrectOptions.py |    3 ++-
 uitest/uitest/test.py                            |    4 ++--
 4 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 87f262dadbbdc1808c5e617003d125ee8df0c501
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sun Mar 24 17:47:02 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun Mar 24 18:40:02 2019 +0100

    Extend timeout for .uno:AutoCorrectDlg UITests
    
    ...which often timed out for the ASan+UBSan Jenkins build, so lets hope that it
    was just an issue with a too short timeout there
    
    Change-Id: Ie50eb1cc16e9444d1392c95ef5c6d810b9e4bd17
    Reviewed-on: https://gerrit.libreoffice.org/69599
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sc/qa/uitest/calc_tests6/autocorrectOptions.py b/sc/qa/uitest/calc_tests6/autocorrectOptions.py
index 146e3300f64a..905f51dcb1da 100644
--- a/sc/qa/uitest/calc_tests6/autocorrectOptions.py
+++ b/sc/qa/uitest/calc_tests6/autocorrectOptions.py
@@ -8,6 +8,7 @@ from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
 import time
+from uitest.config import MAX_WAIT
 from uitest.debug import sleep
 from uitest.uihelper.common import select_pos
 
@@ -19,7 +20,7 @@ class autocorrectOptions(UITestCase):
         gridwin = xCalcDoc.getChild("grid_window")
         document = self.ui_test.get_component()
 
-        self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg")
+        self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg", maxWait=2*MAX_WAIT)
         xDialog = self.xUITest.getTopFocusWindow()
         xTabs = xDialog.getChild("tabcontrol")
         select_pos(xTabs, "0")       #tab replace
diff --git a/sd/qa/uitest/impress_tests/autocorrectOptions.py b/sd/qa/uitest/impress_tests/autocorrectOptions.py
index 759304e01071..498daae982dc 100644
--- a/sd/qa/uitest/impress_tests/autocorrectOptions.py
+++ b/sd/qa/uitest/impress_tests/autocorrectOptions.py
@@ -8,6 +8,7 @@ from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
 import time
+from uitest.config import MAX_WAIT
 from uitest.debug import sleep
 from uitest.uihelper.common import select_pos
 
@@ -20,7 +21,7 @@ class autocorrectOptions(UITestCase):
         self.ui_test.close_dialog_through_button(xCancelBtn)
         document = self.ui_test.get_component()
 
-        self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg")
+        self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg", maxWait=2*MAX_WAIT)
         xDialog = self.xUITest.getTopFocusWindow()
         xTabs = xDialog.getChild("tabcontrol")
         select_pos(xTabs, "0")       #tab replace
diff --git a/sw/qa/uitest/writer_tests5/autocorrectOptions.py b/sw/qa/uitest/writer_tests5/autocorrectOptions.py
index 925cbb59b293..042694b22f68 100644
--- a/sw/qa/uitest/writer_tests5/autocorrectOptions.py
+++ b/sw/qa/uitest/writer_tests5/autocorrectOptions.py
@@ -8,6 +8,7 @@ from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
 import time
+from uitest.config import MAX_WAIT
 from uitest.debug import sleep
 from uitest.uihelper.common import select_pos
 
@@ -19,7 +20,7 @@ class autocorrectOptions(UITestCase):
         xWriterDoc = self.xUITest.getTopFocusWindow()
         xWriterEdit = xWriterDoc.getChild("writer_edit")
 
-        self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg")
+        self.ui_test.execute_dialog_through_command(".uno:AutoCorrectDlg", maxWait=2*MAX_WAIT)
         xDialog = self.xUITest.getTopFocusWindow()
         xTabs = xDialog.getChild("tabcontrol")
         select_pos(xTabs, "0")       #tab replace
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index 0855a9d4efc5..72b2a810c380 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -68,12 +68,12 @@ class UITest(object):
                 time_ += DEFAULT_SLEEP
                 time.sleep(DEFAULT_SLEEP)
 
-    def execute_dialog_through_command(self, command, printNames=False):
+    def execute_dialog_through_command(self, command, printNames=False, maxWait=MAX_WAIT):
         with EventListener(self._xContext, "DialogExecute", printNames=printNames) as event:
             if not self._xUITest.executeDialog(command):
                 raise DialogNotExecutedException(command)
             time_ = 0
-            while time_ < MAX_WAIT:
+            while time_ < maxWait:
                 if event.executed:
                     time.sleep(DEFAULT_SLEEP)
                     return


More information about the Libreoffice-commits mailing list