yihua opened a new pull request, #19407: URL: https://github.com/apache/hudi/pull/19407
### Describe the issue this Pull Request addresses `HiveSyncProcedure` (the `call hive_sync(...)` stored procedure) had almost no coverage on its `call` method: only the class and parameter setup were exercised (around 40% of the file), while the entire body that reads the arguments, applies them to the session and Hadoop configs, builds the `HiveSyncConfig`, runs the sync, and wraps failures was uncovered. ### Summary and Changelog Adds `TestHiveSyncProcedure`, which invokes `call hive_sync(...)` with every optional argument supplied so each argument-handling and configuration-setup branch runs. It passes an unresolvable `partition_extractor_class`, which makes the `HiveSyncTool` constructor fail while loading the extractor in the `HoodieSyncClient` constructor (before any metastore connection is attempted), and pins that the procedure surfaces the failure as a `HoodieException` carrying the `hive sync failed` message via `checkNestedExceptionContains`. This covers argument extraction, all nine optional argument branches, the config assembly (`buildHiveSyncConfig`), the `HiveSyncTool` construction, and the catch/finally path. The successful-sync tail (`syncHoodieTable()` returning and the `hive sync success.` row) is not covered here: it needs a live metastore, and the embedded metastore harness (`HiveTestUtil`) cannot start on the `hudi-spark` test classpath under the JDK 11 CI because of a Thrift version conflict (`HiveTestService`'s server socket and the metastore client both reference Thrift APIs that clash with the Thrift bundled through Spark/Hive on this module). The test is skipped on Java 17, matching the existing Hive-on-Java-17 guard for the other Hive sync test in this module. ### Impact None. Test-only change. ### Risk Level none ### 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]
