[
https://issues.apache.org/jira/browse/HDDS-15277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HDDS-15277:
----------------------------------
Labels: pull-request-available (was: )
> Refactor `TestContainerDataYaml` to ensure proper resource cleanup
> ------------------------------------------------------------------
>
> Key: HDDS-15277
> URL: https://issues.apache.org/jira/browse/HDDS-15277
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Chung En Lee
> Assignee: Hsu Han Wen
> Priority: Minor
> Labels: pull-request-available
>
> It was noted that the resource cleanup method in some unit tests is placed
> directly at the end of the test method block.
> The current implementation introduces a risk: if any assertion fails or if an
> unexpected Exception is thrown during execution, the test flow will be
> interrupted. Consequently, the `cleanup()` method at the end of the block
> will never be executed.
> Refactor `TestContainerDataYaml` to guarantee that the resource cleanup logic
> is always triggered.
> Please move the `cleanup()` logic to `@AfterEach` method within the test
> class so the testing framework manages it automatically.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]