[Geoserver-devel] [JIRA] (GEOS-8724) Intermittent build failure in NamespacesWfsTest

Ben Caradoc-Davies created an issue

GeoServer / BugGEOS-8724

Intermittent build failure in NamespacesWfsTest

Issue Type:

BugBug

Affects Versions:

2.14-beta

Assignee:

Nuno Oliveira

Components:

Application schema

Created:

28/Apr/18 3:59 AM

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”

Priority:

MediumMedium

Reporter:

Ben Caradoc-Davies

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)?

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100083-sha1:bca222d)

Atlassian logo