diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-07 09:37:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-07 11:00:14 +0200 |
commit | c57191e0c45f9735a33953d6b95d54b0e10c876f (patch) | |
tree | bb016181a1cad3e3522a3418f1911c23bb0fc608 /sw | |
parent | fe5afeda8c0a99bc97e1b2009b554d3a2ef4da70 (diff) |
Try to make test_tdf81457_table_merge_undo deterministic
As discussed on #libreoffice-dev:
Aug 07 08:48:59 <sberg> vmiklos, the ASan+UBSan bot fails for a while now in
UITest_writer_tests, e.g., <https://ci.libreoffice.org//job/lo_ubsan/995/
consoleFull#-14523843999567f988-cbcf-4519-af05-6000b834f13f>; a bit unclear
when it started, as it might initially have been hidden by another
(meanwhile fixed) issue that stopped the build before reaching this test; I
can't reproduce it with my local ASan+UBSan build; I guess something timing
dependent, the test code is at sw/qa/uitest/writer_tests/tdf79569.py:32
(i.e., the second .uno:Undo and hits the assert at
sw/source/core/layout/findfrm.cxx:1702 (search for it further up in the
log), after preceding warnings like "Didn't find wished box"; any idea
whether anything there could be timing dependent?
Aug 07 09:09:48 <vmiklos> sberg: i'm not sure if any of that is executed
synchronously, actually. all of these .uno:Foo commands are dispatched async
IIRC
Aug 07 09:13:03 <vmiklos> sberg: the easiest i could think of (to find out if
my assumption is correct) would be to insert the pyuno equivalent of
Scheduler::ProcessEventsToIdle() after the dispatches and see if that helps.
(we should have an UNO interface + service that exposes that)
Not sure whether all of the executeCommand/executeAction would need to be
followed by processEventsToIdle, but probably doesn't hurt to be conservative
there (except maybe for increased run time?).
Change-Id: Iac64330def636a7b7db958e83feae9ce66d0677b
Reviewed-on: https://gerrit.libreoffice.org/58663
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/uitest/writer_tests/tdf79569.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/uitest/writer_tests/tdf79569.py b/sw/qa/uitest/writer_tests/tdf79569.py index ebf752edeb64..631933977ce1 100644 --- a/sw/qa/uitest/writer_tests/tdf79569.py +++ b/sw/qa/uitest/writer_tests/tdf79569.py @@ -20,16 +20,28 @@ class tdf79569(UITestCase): xWriterDoc = self.xUITest.getTopFocusWindow() xWriterEdit = xWriterDoc.getChild("writer_edit") document = self.ui_test.get_component() + toolkit_ex = self.xContext.ServiceManager.createInstanceWithContext( + "com.sun.star.awt.Toolkit", self.xContext) # supports css.awt.XToolkitExperimental self.xUITest.executeCommand(".uno:GoDown") + toolkit_ex.processEventsToIdle() self.xUITest.executeCommand(".uno:GoDown") + toolkit_ex.processEventsToIdle() xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+END"})) + toolkit_ex.processEventsToIdle() self.xUITest.executeCommand(".uno:GoRight") + toolkit_ex.processEventsToIdle() xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "CTRL+END"})) + toolkit_ex.processEventsToIdle() xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "SHIFT+RIGHT"})) + toolkit_ex.processEventsToIdle() self.xUITest.executeCommand(".uno:MergeCells") + toolkit_ex.processEventsToIdle() self.xUITest.executeCommand(".uno:Undo") + toolkit_ex.processEventsToIdle() self.xUITest.executeCommand(".uno:Redo") + toolkit_ex.processEventsToIdle() self.xUITest.executeCommand(".uno:Undo") + toolkit_ex.processEventsToIdle() self.assertEqual(document.TextTables.getCount(), 1) |