Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
17.10.13
-
Unknown
-
-
org.xwiki.ckeditor.test.ui.AllIT$NestedMacroIT#children
Description
Symptom
org.xwiki.ckeditor.test.ui.MacroIT sometimes times out on Firefox in CKEditorToolBar.toggleSourceMode(), which waits 10s for an element to disappear when switching to Source to check the result:
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for org.xwiki.test.ui.XWikiWebDriver$$Lambda$1872/... (tried for 10 seconds with 500 milliseconds interval) at org.xwiki.test.ui.XWikiWebDriver.waitUntilElementDisappears(XWikiWebDriver.java:390) at org.xwiki.ckeditor.test.po.CKEditorToolBar.toggleSourceMode(CKEditorToolBar.java:299) at org.xwiki.ckeditor.test.ui.AbstractCKEditorIT.assertSourceEquals(AbstractCKEditorIT.java:92) at org.xwiki.ckeditor.test.ui.MacroIT.children(MacroIT.java:110)
The failed test leaves CKEditor with unsaved changes, so MacroIT#afterEach cannot leave the edit mode (TestUtils.maybeLeaveEditMode is blocked by the beforeunload dialog). Since AllIT runs all its @Nested ITs in a single browser session, every following test then fails in its setup with:
org.openqa.selenium.UnhandledAlertException: Unexpected beforeunload dialog detected. Performed handler "ignore": This page is asking you to confirm that you want to leave — information you've entered may not be saved. at org.xwiki.test.docker.internal.junit5.XWikiDockerExtension.beforeEach(XWikiDockerExtension.java:198)
So one flicker turns into ~17 failures: the remaining MacroIT methods, TableIT#backspaceAfterInsertRow, and class-level failures of NestedSaveIT, NestedImageIT, NestedTextAreaIT, NestedLinkIT, NestedQuickActionsIT, NestedUndoRedoIT, NestedLocalizationIT, NestedFilterIT and NestedMacroIT.
Occurrences (stable-17.10.x, Oracle 19.3.0-se2 / Jetty 12-jdk25 / Filesystem / Firefox 158)
- https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/stable-17.10.x/320/ (commit 87df7079518): root failure in MacroIT#children
- https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/stable-17.10.x/316/ : root failure in MacroIT#inlineEditMacroInsertedFromOtherMacros, same toggleSourceMode timeout, same cascade
The other environments (Chrome) did not fail.
Local reproduction
MacroIT run 3 times locally on commit 87df7079518 with the same configuration (-Dxwiki.test.ui.database=oracle -Dxwiki.test.ui.databaseTag=19.3.0-se2 -Dxwiki.test.ui.servletEngine=jetty -Dxwiki.test.ui.servletEngineTag=12-jdk25 -Dxwiki.test.ui.browser=firefox -Dxwiki.test.ui.blobStore=filesystem, Firefox 158.0): 21/21 executions passed. So it really is intermittent, not a breakage.
Two things to fix
- the toggleSourceMode timeout itself on Firefox;
- the missing recovery in the cleanup: a failure that leaves unsaved content should not take down the rest of AllIT (see
XWIKI-24806for the same problem in TextAreaImageUploadIT).
Attachments
Issue Links
- relates to
-
XWIKI-24504 MacroIT#editMacro is flickering
-
- Open
-
-
XWIKI-24806 TextAreaImageUploadIT is flickering and its missing edit-mode cleanup fails the rest of AllIT
-
- Closed
-