You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2019/06/16 15:13:00 UTC
[jira] [Updated] (DIRSERVER-1549) Use JUnit TemporaryFolder Rule
[ https://issues.apache.org/jira/browse/DIRSERVER-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny updated DIRSERVER-1549:
-----------------------------------------
Component/s: test
> Use JUnit TemporaryFolder Rule
> ------------------------------
>
> Key: DIRSERVER-1549
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1549
> Project: Directory ApacheDS
> Issue Type: Improvement
> Components: test
> Reporter: Stefan Seelmann
> Assignee: Stefan Seelmann
> Priority: Major
> Fix For: 2.0.0-RC1
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org