Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
13.10.2
-
None
-
Unknown
-
Description
We implemented a solution to have some local build cache in order to improve the performance when building. This cache is also used to not repeat running unit tests and integration tests.
However I just noticed that the cache was not invalidated when running same build with different options for docker test, for example I just ran:
mvn clean install -Dit.test=VelocityIT -Dxwiki.test.ui.browser=chrome
and then called
mvn clean install -Dit.test=VelocityIT -Dxwiki.test.ui.browser=chrome -Dxwiki.test.ui.servletEngine=tomcat -Dxwiki.test.ui.servletEngineTag=9-jdk11 -Dxwiki.test.ui.database=mysql -Dxwiki.test.ui.databaseTag=8
on the second call I got a build success almost immediately and when checking the logs I could see:
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (functional-tests) @ xwiki-platform-flamingo-skin-test-docker --- [INFO] Loaded from the build cache, saving 1m:36s:204ms
We can easily prevent using the cache on the build by using {-Dgradle.cache.local.enabled=false} but I feel it a bit error prone that the options are not taken into account at all: it's easy to miss that the tests have not been executed back when doing several tasks.