Skip to content

Embed balancer.SubConn in generated MockSubConn #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

arjan-bal
Copy link
Contributor

@arjan-bal arjan-bal commented Oct 25, 2024

The doc comment on balancer.SubConn mentions that users should embed the interface so that gRPC Go can add methods to it without breaking them. In #7758, grpc-go will enforce this requirement at compile time by adding an unexported method in the interface. From my reading about Gomock, it doesn't seem to support generating code with the interface already embedded. To avoid breaking the tests using this mock, this PR manually edits the mock to embed the interface.

@nimf
Copy link
Collaborator

nimf commented Oct 25, 2024

/gcbrun

@nimf nimf merged commit 6c6f3d4 into GoogleCloudPlatform:main Oct 25, 2024
2 checks passed
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