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

   ### Describe the issue this Pull Request addresses
   
   Several meta-sync implementation classes were below 80% line coverage in the 
Codecov master snapshot at `2912bf63`. The largest gaps were in Hive 
metastore/JDBC fallback behavior, replication and lock paths, and the default 
`HoodieMetaSyncOperations` methods.
   
   ### Summary and Changelog
   
   Adds focused tests for Hive sync client operations, Hive query failures, 
JDBC metadata edge cases, Hive metastore lock configuration, global-commit 
divergence/config loading, and all default `HoodieMetaSyncOperations` methods. 
Existing embedded-metastore Hive tests continue to exercise end-to-end table, 
schema, and partition synchronization, while the focused tests cover fallback 
and failure branches. The existing DataHub suite uses a mocked `RestEmitter` 
and already clears the target on current master, so no redundant DataHub test 
was added.
   
   Per-class line coverage (`before` is Codecov master `2912bf63` from the 
task; `after` is local JaCoCo on this branch):
   
   | Class | Before | After |
   | --- | ---: | ---: |
   | `HoodieHiveSyncClient` | 48% | 81.2% (324/399) |
   | `HiveSyncTool` | 82% | 89.8% (246/274) |
   | `HMSDDLExecutor` | 80% | 85.5% (159/186) |
   | `HiveMetastoreBasedLockProvider` | 64% | 90.3% (112/124) |
   | `HiveSyncGlobalCommitTool` | 59% | 80.3% (49/61) |
   | `JDBCBasedMetadataOperator` | 72% | 82.0% (91/111) |
   | `JDBCExecutor` | 73% | 81.4% (79/97) |
   | `HiveQueryDDLExecutor` | 65% | 80.4% (82/102) |
   | `HoodieMetaSyncOperations` | 0% | 100.0% (30/30) |
   | `DataHubSyncClient` | 78% | 84.0% (147/175) |
   
   Validation:
   
   - `mvn -pl hudi-sync/hudi-hive-sync -Punit-tests test -Dcheckstyle.skip=true 
-Drat.skip=true` (361 tests)
   - `mvn -pl hudi-sync/hudi-sync-common -Punit-tests test 
-Dcheckstyle.skip=true -Drat.skip=true` (24 tests)
   - `mvn -pl hudi-sync/hudi-datahub-sync -Punit-tests test 
-Dcheckstyle.skip=true -Drat.skip=true` (47 tests)
   - `mvn -pl hudi-sync/hudi-hive-sync,hudi-sync/hudi-sync-common -DskipTests 
-Dcheckstyle.skip=true apache-rat:check`
   
   ### Impact
   
   Test-only change. There are no public API, runtime behavior, storage-format, 
or performance changes.
   
   ### Risk Level
   
   none
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] 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
   


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