Details
-
Bug
-
Resolution: Fixed
-
Major
-
18.3.0-rc-1
-
None
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
Since XWIKI-17828, XWikiDockerExtension stores the XWikiExecutor list, the current executor index, the ServletContainerExecutor list and the PersistentTestContext in the JUnit root store (DockerTestUtils#getStore), and never resets them after a top-level @UITest class has finished. A second top-level class run in the same JVM appends its executor but makes index 0, the previous class's executor, current again. Its extensions are therefore installed on the previous instance, which is still running because Docker servlet containers are only stopped when the JVM exits, and the install fails with:
InstallException: Extension [org.xwiki.platform:xwiki-platform-index-tree-macro/18.10.0-SNAPSHOT] is already installed on namespace [wiki:xwiki]
With Jetty standalone it only works by accident, since both instances use port 8080.
In addition, when WCAG validation is enabled, the second class's afterAll fails with a FileAlreadyExistsException on target/<config>/wcag-reports, because the report directory is per configuration, not per test class.
Seen with SkinVisualIT in xwiki-platform-flamingo-skin-test-docker, on all the environment test configurations (MySQL and PostgreSQL on Tomcat 11, MariaDB and Oracle on Jetty 12), e.g. https://ci.xwiki.org/job/XWiki%20Environment%20Tests/job/xwiki-platform/job/master/1414/
Note that this issue is about the test framework. For SkinVisualIT itself, the better fix is XWIKI-25589: once the icon theme can be switched at runtime without a browser hard refresh, SkinVisualIT can become a nested test of AllIT, like the other tests of the module.
Attachments
Issue Links
- relates to
-
XWIKI-25589 Icons rendered in skin JavaScript files don't change after switching the icon theme until a browser hard refresh
-
- Open
-
-
XWIKI-17828 Add support for clustering in the docker test framework
-
- Closed
-
-
XWIKI-23678 Convert headers.less to CSS
-
- Closed
-