Derby
  1. Derby
  2. DERBY-5455

assertDirectoryDeleted diagnostic printed on console near end of running JUnit tests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Not a Problem
    • Affects Version/s: 10.8.2.2
    • Fix Version/s: 10.10.1.1
    • Component/s: Test
    • Environment:
      mac os x 10.6.8, Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3515)
    • Urgency:
      Normal

      Description

      Near the end of the JUnit tests on the 10.8.2.2 RC, I saw the following diagnostic on the console. Don't know what test this refers to:

      .........................................
      .........................................
      .........................................
      .......................<assertDirectoryDeleted> attempt 1 left 3 files/dirs behind: 0=/Users/rh161140/derby/dummy/testRun/db_master/wombat/log 1=/Users/rh161140/derby/dummy/testRun/db_master/wombat 2=/Users/rh161140/derby/dummy/testRun/db_master
      ................
      Time: 4,221.94

        Activity

        Hide
        Kristian Waagan added a comment -

        Resolving this as Not A Problem and closing the issue.

        Separate issues should be filed for tests that cause the diagnostics to be printed, as it is usually an
        indication that something is wrong (i.e. leaked file handles, or deleting a booted database directory).

        I don't think these diagnostics are frequent enough (currently) to warrant a more formal collection mechanism.

        Show
        Kristian Waagan added a comment - Resolving this as Not A Problem and closing the issue. Separate issues should be filed for tests that cause the diagnostics to be printed, as it is usually an indication that something is wrong (i.e. leaked file handles, or deleting a booted database directory). I don't think these diagnostics are frequent enough (currently) to warrant a more formal collection mechanism.
        Hide
        Rick Hillegas added a comment -

        Hi Myrna, I'm not planning any work on this issue. Thanks.

        Show
        Rick Hillegas added a comment - Hi Myrna, I'm not planning any work on this issue. Thanks.
        Hide
        Myrna van Lunteren added a comment -

        Rick, Kristian, is there any further work expected on this issue?

        Show
        Myrna van Lunteren added a comment - Rick, Kristian, is there any further work expected on this issue?
        Hide
        Kristian Waagan added a comment -

        A small correction: The test will fail if one or more files have not been deleted after four attempts.

        Show
        Kristian Waagan added a comment - A small correction: The test will fail if one or more files have not been deleted after four attempts.
        Hide
        Rick Hillegas added a comment -

        That sounds like a good suggestion to me. The message seems like noise to me if no-one is interested in tracking when a second attempt is needed to delete the cruft.

        It sounds as though the test itself will fail if we can't delete the cruft on the second attempt. I think that means that the existing machinery will then tell us which test tripped across the problem. That addresses my other puzzlement with this diagnostic: I couldn't see which test was involved. Thanks.

        Show
        Rick Hillegas added a comment - That sounds like a good suggestion to me. The message seems like noise to me if no-one is interested in tracking when a second attempt is needed to delete the cruft. It sounds as though the test itself will fail if we can't delete the cruft on the second attempt. I think that means that the existing machinery will then tell us which test tripped across the problem. That addresses my other puzzlement with this diagnostic: I couldn't see which test was involved. Thanks.
        Hide
        Kristian Waagan added a comment -

        I don't think anyone is collecting statistics on this.

        Maybe the level of noise is too high. Would it be an idea to only start printing warnings after the second attempt fails?
        At that point, all files have been attempted deleted once, and then another attempt was made after sleeping for two seconds. We could loose out on traces after situations where we delete booted databases (or at least where the database is in progress of being shut down), but that may not be a problem. Real problems, for instance where we fail to close file handles, wouldn't be affected by such a change.

        Show
        Kristian Waagan added a comment - I don't think anyone is collecting statistics on this. Maybe the level of noise is too high. Would it be an idea to only start printing warnings after the second attempt fails? At that point, all files have been attempted deleted once, and then another attempt was made after sleeping for two seconds. We could loose out on traces after situations where we delete booted databases (or at least where the database is in progress of being shut down), but that may not be a problem. Real problems, for instance where we fail to close file handles, wouldn't be affected by such a change.
        Hide
        Rick Hillegas added a comment -

        Thanks for that explanation, Kristian. Is someone collecting statistics on re-tried deletions? Should people record instances of this diagnostic on this JIRA or is there a better place to aggregate this information? Thanks.

        Show
        Rick Hillegas added a comment - Thanks for that explanation, Kristian. Is someone collecting statistics on re-tried deletions? Should people record instances of this diagnostic on this JIRA or is there a better place to aggregate this information? Thanks.
        Hide
        Kristian Waagan added a comment -

        That message means that assertDirectoryDeleted failed to delete three files on the first attempt to delete the db_master directory (which is the master database used by the replication test I assume), but that it succeeded on the second attempt.
        If assertDirectoryDeleted is unable to delete all files including the directory itself after the maximum number of attempts, it will fail the test.
        I adjusted the priority to minor.

        There is also DERBY-5386 for a different, but related, problem in the replication test. The code looks sound, but obviously something isn't quite right...

        Show
        Kristian Waagan added a comment - That message means that assertDirectoryDeleted failed to delete three files on the first attempt to delete the db_master directory (which is the master database used by the replication test I assume), but that it succeeded on the second attempt. If assertDirectoryDeleted is unable to delete all files including the directory itself after the maximum number of attempts, it will fail the test. I adjusted the priority to minor. There is also DERBY-5386 for a different, but related, problem in the replication test. The code looks sound, but obviously something isn't quite right...

          People

          • Assignee:
            Unassigned
            Reporter:
            Rick Hillegas
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development