Skip to content

Add unit tests for HiveFederatedCatalogFactory#4852

Open
venkateshwaracholan wants to merge 1 commit into
apache:mainfrom
venkateshwaracholan:issue-hive-federated-catalog-factory-tests
Open

Add unit tests for HiveFederatedCatalogFactory#4852
venkateshwaracholan wants to merge 1 commit into
apache:mainfrom
venkateshwaracholan:issue-hive-federated-catalog-factory-tests

Conversation

@venkateshwaracholan

@venkateshwaracholan venkateshwaracholan commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

This change adds unit test coverage for HiveFederatedCatalogFactory in the polaris-extensions-federation-hive module.

A new HiveFederatedCatalogFactoryTest has been added to verify the factory's behavior in isolation, without requiring a running Hive environment or any external infrastructure. The tests focus on validating the factory's core behavior, including authentication handling, catalog creation, and expected exception paths.

Specifically, the test suite verifies that unsupported authentication types are rejected with the appropriate exception, confirms that the supported IMPLICIT authentication flow successfully creates a catalog, and ensures that createGenericCatalog() continues to throw UnsupportedOperationException as designed. Constructor initialization behavior is also covered.

The tests are implemented as lightweight unit tests using Mockito mocks, making them fast, reliable, and independent of external services.

Changes

  • Added HiveFederatedCatalogFactoryTest.
  • Added coverage for unsupported authentication type validation.
  • Added coverage for successful catalog creation using IMPLICIT authentication.
  • Added verification that createGenericCatalog() throws UnsupportedOperationException.
  • No production code changes.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@venkateshwaracholan venkateshwaracholan force-pushed the issue-hive-federated-catalog-factory-tests branch from 764b892 to 3319e40 Compare June 22, 2026 16:29
@dimas-b dimas-b requested review from dennishuo and flyrain June 25, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant