Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19339

Docker test options are not considered for invalidating test-integration cache

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 13.10.2
    • Test Framework
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            surli Simon Urli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: