test: cover implementation bridge accessor initialization#49724
Open
amirdeljouyi wants to merge 2 commits into
Open
test: cover implementation bridge accessor initialization#49724amirdeljouyi wants to merge 2 commits into
amirdeljouyi wants to merge 2 commits into
Conversation
Contributor
|
Thank you for your contribution @amirdeljouyi! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends ImplementationBridgeHelpersTest with additional unit coverage for ImplementationBridgeHelpers accessor behavior, specifically validating lazy accessor initialization via accessor getters and ensuring accessor setters are idempotent (don’t replace an already-installed accessor).
Changes:
- Refactors repeated
"Helper"/getDeclaredClasses()usage into shared constants. - Adds a unit test that iterates helper classes and invokes accessor getters after clearing cached accessor state.
- Adds a unit test that verifies calling accessor setters twice does not replace the initially installed accessor.
Comment on lines
+763
to
+764
| assertThat(accessorSetterCount).isGreaterThan(0); | ||
| } |
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hi,
This PR adds focused unit coverage for
ImplementationBridgeHelpers.It covers accessor initialization behavior across the helper classes, including the CosmosClientBuilder accessor path and the bulk execution thresholds accessor path.
The tests check lazy getter initialization after cached accessor state is cleared, and that a second setter call does not replace an accessor that was already installed. Line coverage for
ImplementationBridgeHelpersincreases by 31%.I hope you find these tests useful. 😄 Please let me know if you have any questions or concerns.
Thanks,
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines