Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-M32
    • Labels:
      None

      Description

      In many tests we need to create temporary files and folders. We use methods like:
      File.createTempFile()
      File.deleteOnExit()
      File.delete()
      org.apache.commons.io.FileUtils.deleteDirectory()

      JUnit 4.7 introduced the TemporaryFolder Rule: http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TemporaryFolder.html that guarantees that files and folders are delteted after each test. We should use this rule and remove all handmade temporary file code.

        Issue Links

          Activity

          Show
          elecharny Emmanuel Lecharny added a comment - Done with http://svn.apache.org/viewvc?rev=1706838&view=rev
          Hide
          elecharny Emmanuel Lecharny added a comment -

          It's an excellent idea, but I think it should be postponed. We first have to fix real issues. When we reach the RC state, then we can check the tests and use the Junit temporary rule.

          Show
          elecharny Emmanuel Lecharny added a comment - It's an excellent idea, but I think it should be postponed. We first have to fix real issues. When we reach the RC state, then we can check the tests and use the Junit temporary rule.

            People

            • Assignee:
              seelmann Stefan Seelmann
              Reporter:
              seelmann Stefan Seelmann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development