sarvekshayr opened a new pull request, #9184: URL: https://github.com/apache/ozone/pull/9184
## What changes were proposed in this pull request? The [FailureType](https://github.com/apache/ozone/blob/81a2ee6c972975f676ca5ca4fa7b1ba1b86fd003/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerScanError.java#L30) enum is used to indicate what type of issue the scanner saw. [TestContainerCorruptions](https://github.com/apache/ozone/blob/8ff233517d9526ff9377e776ad0c64d10f0554ab/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/TestContainerCorruptions.java#L49) also provides an enum for injecting different types of failures into tests. The two are separate since some FailureTypes may be hit with multiple paths, each identified by a unique entry in TestContainerCorruptions As suggested in [this comment](https://github.com/apache/ozone/pull/7396#issuecomment-2484214305), introduced a test to trigger a test failure if a new FailureType is added (expanding the functionality of the scanner) but no corresponding test is added. This may mean making the two enums more tightly coupled. ## What is the link to the Apache JIRA [HDDS-11756](https://issues.apache.org/jira/browse/HDDS-11756) ## How was this patch tested? Added `TestFailureTypeCoverage`. Test fails if a `FailureType` does not have a corresponding test or is not explicitly excluded. ``` org.opentest4j.AssertionFailedError: The following FailureType values do not have corresponding test corruptions in TestContainerCorruptions: [WRITE_FAILURE]. Either add test cases for these failure types or exclude them with an explanation (via getExcludedFailureTypes()). ==> ``` -- 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]
