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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • core-libs

      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.

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

              Created:
              Updated: