cshuo opened a new pull request, #19353: URL: https://github.com/apache/hudi/pull/19353
### Describe the issue this Pull Request addresses Closes #19352. The native log format and CDC write handles in `hudi-client-common` lacked direct test coverage. This left record routing, file rollover, CDC supplemental logging modes, merge ordering, statistics publication, and representative failure handling insufficiently protected. This PR adds focused tests and raises every class in scope above the 70% line-coverage target. | Class | Before | After | | --- | ---: | ---: | | `HoodieNativeLogFormatWriter` | 0.0% | 84.7% | | `HoodieNativeLogAppendHandle` | 0.0% | 71.7% | | `FileGroupReaderBasedNativeLogAppendHandle` | 0.0% | 88.7% | | `HoodieNativeCDCLogger` | 0.0% | 91.4% | | `HoodieNativeCDCFileWriter` | 0.0% | 98.2% | | `HoodieAvroNativeCDCLogger` | 0.0% | 90.9% | | `HoodieSortedMergeHandle` | 0.0% | 77.5% | | `HoodieMergeHandleWithChangeLog` | 0.0% | 83.9% | ### Summary and Changelog #### Commit 1: test(client): improve native log and CDC write coverage (`4956c8de4d3`) - Add native log append-handle tests for data/delete routing, rollover, write-count accounting, configured record keys, ignored records, lifecycle behavior, and flush failures. - Cover file-group-reader append behavior, instant and read-stat propagation, write-status annotation, and failure wrapping. - Exercise Avro and generic native CDC loggers for all supplemental logging modes across insert, update, delete, pending-record, retraction, and close paths. - Extend native CDC file-writer coverage for file rolling, version collision handling, creation callbacks, partitioned/non-partitioned statistics, and I/O failures. - Cover sorted merge ordering and pending inserts, plus insert/update CDC emission and status publication for change-log merge handles. ### Impact - **Functional impact**: None. This is a test-only change and does not modify production behavior. - **Maintainability**: Protects native log and CDC write paths against regressions with focused behavioral assertions. - **Extensibility**: Provides test fixtures for adding native log formats, CDC modes, and merge-handle behavior. ### Risk Level Low. The change only adds and extends unit tests. The targeted suite, Checkstyle, and Apache RAT all pass. ### Documentation Update None. ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable - [x] `mvn -pl hudi-client/hudi-client-common -am -DskipTests -DskipITs -DskipSparkTests -DskipScalaTests checkstyle:check` - [x] Native log/CDC targeted suite: 28 tests, 0 failures, 0 errors, 0 skipped -- 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]
