Skip to content

test: cover implementation bridge accessor initialization#49724

Open
amirdeljouyi wants to merge 2 commits into
Azure:mainfrom
amirdeljouyi:pr-tests-implementationbridgehelpers
Open

test: cover implementation bridge accessor initialization#49724
amirdeljouyi wants to merge 2 commits into
Azure:mainfrom
amirdeljouyi:pr-tests-implementationbridgehelpers

Conversation

@amirdeljouyi

Copy link
Copy Markdown

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 ImplementationBridgeHelpers increases 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:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings July 4, 2026 15:15
@amirdeljouyi amirdeljouyi requested review from a team and kirankumarkolli as code owners July 4, 2026 15:15
@github-actions github-actions Bot added Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution @amirdeljouyi! We will review the pull request and get back to you soon.

Copilot AI left a comment

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.

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);
}
@amirdeljouyi

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants