Skip to content

test(core): add hfile compression codec coverage - #622

Open
slfan1989 wants to merge 1 commit into
apache:mainfrom
slfan1989:hudi-621
Open

test(core): add hfile compression codec coverage#622
slfan1989 wants to merge 1 commit into
apache:mainfrom
slfan1989:hudi-621

Conversation

@slfan1989

Copy link
Copy Markdown

Description

Add dedicated unit test coverage for the HFile compression codec implementation in
crates/core/src/hfile/compression.rs.

The new tests cover:

  • mapping supported HFile compression codec IDs to CompressionCodec variants
  • rejecting an unknown codec ID with HFileError::UnsupportedCompression
  • returning input bytes unchanged for the None codec
  • successfully decompressing a GZIP payload
  • returning an error for an invalid GZIP payload
  • returning explicit unsupported-codec errors for LZO, Snappy, LZ4, BZIP2, and ZSTD

This is a test-only change and does not modify production behavior.

Closes #621.

How are the changes test-covered

  • N/A
  • Automated tests (unit and/or integration tests)
  • Manual tests
  • Details are described below

Added six unit tests covering codec ID parsing, successful decompression paths, and error handling paths in the HFile compression module.

@slfan1989
slfan1989 requested a review from xushiyan as a code owner May 24, 2026 08:59
@slfan1989 slfan1989 changed the title test(core): add hfile compression codec coverage. test(core): add hfile compression codec coverage May 24, 2026
@codecov

codecov Bot commented May 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.66%. Comparing base (0910ca7) to head (03ac3cc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #622      +/-   ##
==========================================
+ Coverage   82.37%   82.66%   +0.28%     
==========================================
  Files          83       83              
  Lines        6311     6311              
==========================================
+ Hits         5199     5217      +18     
+ Misses       1112     1094      -18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@slfan1989

Copy link
Copy Markdown
Author

@yihua @xushiyan Could you please help review this PR? Thank you very much!

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.

Add unit test coverage for HFile compression codecs

1 participant