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

PostScriptTransformTest recursively deletes entire system temporary directory

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Highest
    • Resolution: Fixed
    • Affects Version/s: 2.14-RC
    • Fix Version/s: 2.14-RC
    • Component/s: Importer
    • Labels:
      None

      Description

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

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: