Kaydet (Commit) 87f262da authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f920e86f
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment