Skip to content

test: add empty string and unicode edge cases to ValueTest#8219

Open
Tusharika725 wants to merge 3 commits intoopen-telemetry:mainfrom
Tusharika725:add-value-test-cases
Open

test: add empty string and unicode edge cases to ValueTest#8219
Tusharika725 wants to merge 3 commits intoopen-telemetry:mainfrom
Tusharika725:add-value-test-cases

Conversation

@Tusharika725
Copy link
Copy Markdown

Description

Resolves an inline TODO in ValueTest.java to add more test cases.

Added edge cases for the valueByteAsString() method to ensure string encoding/decoding handles boundaries without data loss. Specifically added:

  • An empty string boundary.
  • A special character/Unicode boundary (testing whitespace, newlines, and a 4-byte emoji).

All local tests pass.

@Tusharika725 Tusharika725 requested a review from a team as a code owner March 27, 2026 19:32
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 27, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.31%. Comparing base (a88681a) to head (8fcff5e).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8219      +/-   ##
============================================
- Coverage     90.31%   90.31%   -0.01%     
+ Complexity     7653     7652       -1     
============================================
  Files           843      843              
  Lines         23066    23071       +5     
  Branches       2310     2311       +1     
============================================
+ Hits          20832    20836       +4     
  Misses         1516     1516              
- Partials        718      719       +1     

☔ View full report in Codecov by Sentry.
📢 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.

@jkwatson
Copy link
Copy Markdown
Contributor

It would be extra-cool if you made this into a fuzz-test that would test a wider variety of possible inputs. I think there are examples of this in the codebase somewhere. (search for "fuzz")

@Tusharika725
Copy link
Copy Markdown
Author

"@jkwatson Thanks for the great suggestion! I've implemented a property-based fuzz test using JQF alongside the original deterministic tests. Let me know if you need any further adjustments!

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.

2 participants