yihua opened a new pull request, #19220:
URL: https://github.com/apache/hudi/pull/19220

   ### Describe the issue this Pull Request addresses
   
   Several `hudi-common` configuration and utility classes had little or no 
unit-test coverage. This PR adds focused, pure JUnit 5 unit tests (no Spark, 
engine, or table fixtures) to raise coverage of previously untested branches in 
these classes.
   
   ### Summary and Changelog
   
   Adds unit coverage for four `hudi-common` classes:
   
   - `DateTimeUtils`: extends the existing test with micros/nanos/millis 
conversions (including the negative-epoch branches), `parseDuration` for valid 
unit labels, unit-omitted default, and invalid/blank/null inputs, and 
`formatUnixTimestamp`.
   - `CollectionUtils`: extends the existing test to cover previously untested 
helpers such as `isNullOrEmpty`/`nonEmpty`, `reduce`, `copy`, `tail`, 
`toStream`/`toList`, array/list/map `combine` and `append`, `zipToMap`, 
`diff`/`diffSet`, `elementsEqual`, the immutable-collection factories, 
`createSet`, `reverseMap`, and `emptyProps`.
   - `ConfigGroups`: new test verifying `getDescription` returns a real 
description for every `Names` constant and that `Names`/`SubGroupNames` carry 
their human-readable name and description.
   - `HoodieIndexingConfig`: new test covering builder paths, default 
application on `build`, `isIndexUsing*` helpers, `fromProperties`, `copy`, 
`merge` override semantics, `fromIndexDefinition`, and 
`generateChecksum`/`validateChecksum` including the missing-index-name error 
path.
   
   No production code is changed; all changes are new or extended test classes.
   
   ### Impact
   
   Test-only change. No public API or user-facing behavior change and no 
performance impact.
   
   ### Risk Level
   
   low
   
   Tests only; no production code paths are modified.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


-- 
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]

Reply via email to