Skip to content

hierarchy: Use public API for testing#8846

Merged
arjan-bal merged 2 commits intogrpc:masterfrom
arjan-bal:heirarchy-test
Jan 21, 2026
Merged

hierarchy: Use public API for testing#8846
arjan-bal merged 2 commits intogrpc:masterfrom
arjan-bal:heirarchy-test

Conversation

@arjan-bal
Copy link
Copy Markdown
Contributor

@arjan-bal arjan-bal commented Jan 21, 2026

As requested in #8841 (comment), this PR moves existing tests to a different package to enforce the use of public APIs.

RELEASE NOTES: N/A

@arjan-bal arjan-bal added this to the 1.79 Release milestone Jan 21, 2026
@arjan-bal arjan-bal added Type: Internal Cleanup Refactors, etc Area: xDS Includes everything xDS related, including LB policies used with xDS. labels Jan 21, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.27%. Comparing base (90f571d) to head (daa45db).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8846      +/-   ##
==========================================
+ Coverage   83.18%   83.27%   +0.08%     
==========================================
  Files         414      414              
  Lines       32720    32720              
==========================================
+ Hits        27219    27246      +27     
+ Misses       4086     4068      -18     
+ Partials     1415     1406       -9     

see 24 files with indirect coverage changes

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

Comment on lines +29 to +30
// Tests that if hierarchy is set to a wrong type (which should never happen),
// the endpoint is ignored.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure how this scenario is reachable given that the key type is unexported, or why we are testing this behavior. However, I retained this test case to preserve existing coverage.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems a bit paranoid. I'm OK with removing that test.

@arjan-bal arjan-bal merged commit 3fb101d into grpc:master Jan 21, 2026
14 checks passed
mbissa pushed a commit to mbissa/grpc-go that referenced this pull request Feb 16, 2026
As requested in
grpc#8841 (comment), this
PR moves existing tests to a different package to enforce the use of
public APIs. One test remains in the old package as it requires access
to the private attribute key type.

RELEASE NOTES: N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants