[Geoserver-devel] [JIRA] (GEOS-8797) PostScriptTransformTest recursively deletes entire system temporary directory

Ben Caradoc-Davies created an issue

GeoServer / BugGEOS-8797

PostScriptTransformTest recursively deletes entire system temporary directory

Issue Type:

BugBug

Affects Versions:

2.14-beta

Assignee:

Andrea Aime

Components:

Importer

Created:

22/Jun/18 8:30 AM

Priority:

HighestHighest

Reporter:

Ben Caradoc-Davies

PostScriptTransformTest calls FileUtils.deleteQuietly on the system temporary directory (/tmp on Linux), causing its recursive deletion (as far as permissions allow), and all manner of havoc. In particular, this also deletes /tmp/Geotools, causing failure of any concurrently running test trying to resolve an EPSG code, not to mention the failure of any concurrently running test that stores data in /tmp.

In setUp:
https://github.com/geoserver/geoserver/blob/master/src/extension/importer/rest/src/test/java/org/geoserver/importer/rest/PostScriptTransformTest.java#L22

dd = new GeoServerDataDirectory(FileUtils.getTempDirectory());

FileUtils.getTempDirectory() is not a temporary directory, it is the temporary directory. Later, in teardown:
https://github.com/geoserver/geoserver/blob/master/src/extension/importer/rest/src/test/java/org/geoserver/importer/rest/PostScriptTransformTest.java#L36

File dir = dd.getRoot().dir();
FileUtils.deleteQuietly(dir);

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#100087-sha1:06ee275)

Atlassian logo