Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: 2.14-RC
-
Component/s: Application schema
-
Labels:None
-
Environment:
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T07:39:06+12:00)
Maven home: /home/ben/java/maven
Java version: 1.8.0_171, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-3-amd64", arch: "amd64", family: "unix"Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T07:39:06+12:00) Maven home: /home/ben/java/maven Java version: 1.8.0_171, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_GB, platform encoding: UTF-8 OS name: "linux", version: "4.15.0-3-amd64", arch: "amd64", family: "unix"
-
Triage:
Description
When building locally, NamespacesWfsTest often fails:
Tests run: 12, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.075 sec <<< FAILURE! org.geoserver.test.NamespacesWfsTest Time elapsed: 30 sec <<< ERROR! java.lang.RuntimeException: Error removing tests root directory '/tmp/app-schema-stations0.8919071535610709'. at org.geoserver.test.NamespacesWfsTest.afterTests(NamespacesWfsTest.java:96) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33) 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) org.geoserver.test.NamespacesWfsTest Time elapsed: 31 sec <<< ERROR! java.lang.RuntimeException: Error removing tests root directory '/tmp/app-schema-stations0.11389497400033388'. at org.geoserver.test.StationsMockData.tearDown(StationsMockData.java:235) at org.geoserver.test.GeoServerBaseTestSupport.doTearDownClass(GeoServerBaseTestSupport.java:205) at sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33) 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)
Results : Tests in error: org.geoserver.test.NamespacesWfsTest: Error removing tests root directory '/tmp/app-schema-stations0.8919071535610709'. org.geoserver.test.NamespacesWfsTest: Error removing tests root directory '/tmp/app-schema-stations0.11389497400033388'. Tests run: 202, Failures: 0, Errors: 2, Skipped: 11
There seems to be state sharing between StationsMockData instances via the static final (i.e. statically initialised) TEST_ROOT_DIRECTORY, and all instances attempt to remove it in tearDown. Fixing this by making it an instance variable did not resolve the failure. There is a similar pattern in NamespacesWfsTest itself but I do not see how this could have multiple instances (final class); I am not sure why this fixture creates two directories. Nuno Oliveira can you see what is going wrong? I wonder if there is some interaction with the one-time setup infrastructure of GeoServerSystemTestSupport (or rather, its shutdown phase)?