You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "hevinhsu (via GitHub)" <gi...@apache.org> on 2026/05/15 08:30:14 UTC

[PR] HDDS-15277. Refactor `TestContainerDataYaml` to ensure proper resource cleanup [ozone]

hevinhsu opened a new pull request, #10275:
URL: https://github.com/apache/ozone/pull/10275

   # What changes were proposed in this pull request?
   Refactor `TestContainerDataYaml` to use JUnit 5 `@TempDir` for temporary file management.
   
   Previously, the test relied on a shared static test directory created via `FileSystemTestHelper#getTestRootDir()` and manually cleaned it up using `FileUtil.fullyDelete(...)`.
   
   This change replaces the manual lifecycle management with `@TempDir`, so each test gets an isolated temporary directory and the framework automatically handles cleanup after test execution.
   
   This removes shared state between tests and makes cleanup more reliable when assertions fail or unexpected exceptions occur.
   
   This ensures cleanup always happens while keeping test behavior isolated and deterministic.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-15277
   
   ## How was this patch tested?
   https://github.com/hevinhsu/ozone/actions/runs/25904967962


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15277. Refactor `TestContainerDataYaml` to ensure proper resource cleanup [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #10275:
URL: https://github.com/apache/ozone/pull/10275


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15277. Refactor `TestContainerDataYaml` to ensure proper resource cleanup [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #10275:
URL: https://github.com/apache/ozone/pull/10275#issuecomment-4480231198

   Thanks @hevinhsu for the patch, @chungen0126 for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15277. Refactor `TestContainerDataYaml` to ensure proper resource cleanup [ozone]

Posted by "hevinhsu (via GitHub)" <gi...@apache.org>.
hevinhsu commented on PR #10275:
URL: https://github.com/apache/ozone/pull/10275#issuecomment-4483589953

   Thanks @chungen0126 for the review, @adoroszlai for the merge.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org