[ 
https://issues.apache.org/jira/browse/HDDS-9103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Attila Doroszlai updated HDDS-9103:
-----------------------------------
    Summary: Replace GenericTestUtils temp directories with `@TempDir`  (was: 
Replace GenericTestUtils temp directories with @TempDir)

> Replace GenericTestUtils temp directories with `@TempDir`
> ---------------------------------------------------------
>
>                 Key: HDDS-9103
>                 URL: https://issues.apache.org/jira/browse/HDDS-9103
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: test
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Major
>
> Replace temporary directory functionality of {{GenericTestUtils}} with 
> JUnit's 
> {{[\@TempDir|https://junit.org/junit5/docs/current/user-guide/#writing-tests-built-in-extensions-TempDirectory]}}.
>   The latter is automatically cleaned up.
> * Usage of {{File getRandomizedTestDir()}}, {{File getTestDir()}}, and {{File 
> getTestDir(String)}} can be directly replaced by {{@TempDir}}.  If the temp 
> directory is stored in a local variable, convert it to a field for it.
> * For usages of {{String getRandomizedTempPath()}} and {{String 
> getTempPath(String)}} we still need to add a {{Path}} or {{File}} as a field, 
> and use {{toString()}} where needed.
> * Post-test deletion of the dir can be removed.
> * If {{@BeforeEach}} and {{@AfterEach}} methods are only used to 
> create/delete the dir, they can be deleted as well.
> * Any unused imports should be removed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to