Skip to content

SK-2430: Add unit tests for detokenization UDF - #6

Merged
saileshwar-skyflow merged 6 commits into
mainfrom
saileshwar/SK-2430-add-unit-tests-for-detokenize-udf
Dec 12, 2025
Merged

saileshwar-skyflow merged 6 commits into
mainfrom
saileshwar/SK-2430-add-unit-tests-for-detokenize-udf

Conversation

@saileshwar-skyflow

Copy link
Copy Markdown
Contributor

Why

  • Current test coverage for the Hive detokenization UDF is low. More tests are needed to properly validate the functionality and make it reliable.

Outcome

  • Coverage will increase to around 80% and will be tracked through Codecov for visibility and future improvements.

Comment thread .github/workflows/detokenization-coverage.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances test coverage for the Hive detokenization UDF by adding comprehensive unit tests across validation, helper, configuration, and main UDF classes. The goal is to increase coverage to approximately 80% and integrate code coverage tracking via JaCoCo.

  • Added unit tests for Validations, Helper, Config, and DetokenizeUDF classes
  • Integrated JaCoCo plugin for code coverage reporting
  • Added GitHub Actions workflow for automated coverage tracking

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
hive/detokenization/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker Enables inline mocking for Mockito to support mocking of final classes
hive/detokenization/src/test/java/com/skyflow/hive/utils/ValidationsTest.java New comprehensive test suite for validation logic including session state, config, credentials, and file path validation
hive/detokenization/src/test/java/com/skyflow/hive/utils/HelperTest.java Extended test coverage for helper utilities including credentials file and vault URL initialization scenarios
hive/detokenization/src/test/java/com/skyflow/hive/utils/ConfigTest.java Migrated from JUnit 4 to JUnit 5 and added tests for partial field deserialization and getters
hive/detokenization/src/test/java/com/skyflow/hive/DetokenizeUDFTest.java Enhanced UDF tests with success/failure scenarios, mocking improvements, and null input handling
hive/detokenization/src/main/java/com/skyflow/hive/utils/Validations.java Added explicit exception handling to preserve UDFArgumentException in catch blocks
hive/detokenization/pom.xml Added JaCoCo Maven plugin configuration for coverage reporting
.github/workflows/detokenization-coverage.yml New CI workflow for running tests and uploading coverage reports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hive/detokenization/src/test/java/com/skyflow/hive/DetokenizeUDFTest.java Outdated
Comment thread .github/workflows/detokenization-coverage.yml Outdated
Comment thread hive/detokenization/src/main/java/com/skyflow/hive/utils/Validations.java Outdated
@saileshwar-skyflow
saileshwar-skyflow merged commit 389a6cd into main Dec 12, 2025
1 check passed
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.

3 participants