Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8183350

Better cleanup for jdk/test/java/util/logging/CheckLockLocationTest.java

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      The setup() method in CheckLockLocationTest.java calls a private method createFile() to create writable-dir

      If the file already exists, createFile() returns true, which I expect would be surprising, especially if 'writable-dir' was a regular file and not a directory due to some external agent.

      The reason I looked at this is that I found a two month old file on one of the test systems:

      $ pwd
      /tmp

      $ ls -ld writable-dir writable-dir/*
      drwxr-xr-x+ 1 mach5-one None 0 Apr 17 10:49 writable-dir
      -rwxr-xr-x 1 mach5-one None 0 Apr 17 10:49 writable-dir/log.log

      So for the past two months, subsequent runs of this test have been using an existing directory instead of creating what they need as a precondition.

        Attachments

          Activity

            People

            • Assignee:
              dfuchs Daniel Fuchs
              Reporter:
              tbell Tim Bell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: