ptlrs opened a new pull request, #7399: URL: https://github.com/apache/ozone/pull/7399
## What changes were proposed in this pull request? Use `@TempDir` annotation instead of `GenericTestUtils`' temporary directory creation methods Please describe your PR in detail: 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. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-10166 ## How was this patch tested? CI: https://github.com/ptlrs/ozone/actions/runs/11700108172 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
