Uploaded image for project: 'GeoServer'
  1. GEOS-8814

Intermittent build failure caused by H2 log race with fixture data directory deletion

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.12.4, 2.13.1, 2.14-RC
    • Fix Version/s: 2.13.2, 2.14-RC
    • Component/s: Global
    • Labels:
      None
    • Environment:

      Linux

      Description

      Tests sometimes fail because H2 logs are written during fixture data directory deletion. I propose that we fix this by making unconditional use of the lenient branch of SystemTestData.deleteFilesOnExit on all platforms. Failure:

      org.geoserver.catalog.ResourcePoolTest  Time elapsed: 56 sec  <<< ERROR!
      java.lang.RuntimeException: java.io.IOException: Failed to delete tree 
      ./target/default3332787525887648493data
      └──data
         └──h2test.2.log.db
      
      	at org.geoserver.test.GeoServerBaseTestSupport$1.apply(GeoServerBaseTestSupport.java:97)
      	at org.junit.rules.RunRules.applyAll(RunRules.java:26)
      	at org.junit.rules.RunRules.<init>(RunRules.java:15)
      	at org.junit.runners.BlockJUnit4ClassRunner.withTestRules(BlockJUnit4ClassRunner.java:379)
      	at org.junit.runners.BlockJUnit4ClassRunner.withRules(BlockJUnit4ClassRunner.java:340)
      	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:256)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
      Caused by: java.io.IOException: Failed to delete tree 
      ./target/default3332787525887648493data
      └──data
         └──h2test.2.log.db
      
      	at org.geoserver.data.test.SystemTestData.deleteFilesOnExit(SystemTestData.java:1106)
      	at org.geoserver.data.test.SystemTestData.tearDown(SystemTestData.java:1094)
      	at org.geoserver.test.GeoServerBaseTestSupport.doTearDownClass(GeoServerBaseTestSupport.java:189)
      	at org.geoserver.test.GeoServerBaseTestSupport$1.apply(GeoServerBaseTestSupport.java:95)
      	... 27 more
      Caused by: java.io.IOException: Unable to delete directory ./target/default3332787525887648493data.
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1337)
      	at org.geoserver.data.test.SystemTestData.deleteFilesOnExit(SystemTestData.java:1100)
      	... 30 more
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                bencaradocdavies Ben Caradoc-Davies
                Reporter:
                bencaradocdavies Ben Caradoc-Davies
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: