Chung En Lee created HDDS-15277:
-----------------------------------

             Summary: 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


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]

Reply via email to