Skip to content
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

Unable to test end to end configuration options #1311

Open
chingor13 opened this issue Jun 18, 2020 · 4 comments
Open

Unable to test end to end configuration options #1311

chingor13 opened this issue Jun 18, 2020 · 4 comments
Labels
gax priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@chingor13
Copy link
Contributor

Code that glues ClientSettings to the ClientContext is generated by gapic generator making it difficult to test that configuration options make it to the transport layer.

Can we generate a test client where we can mock out the transport for testing purposes?

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jun 19, 2020
@chingor13
Copy link
Contributor Author

Can we run gapic-generator on showcase within this repo so we can test against the showcase client?

@hkdevandla
Copy link
Member

I'm not sure if showcase supports (testing config options) or if that is something that we can implement it.

@miraleung , any thoughts?

@hkdevandla hkdevandla added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Jul 6, 2020
@yoshi-automation yoshi-automation removed the 🚨 This issue needs some love. label Jul 6, 2020
@miraleung
Copy link
Contributor

@chingor13 Could you please provide more detail, ideally with a client lib such as dataproc so we can go over concrete examples? This would help us better understand where the codegen gap lies, and the motivating use case.

Note that we will likely skip adding this to gapic-generator, and just add it directly to gapic-generator-java as the Gapic class generation logic will be coming soon.

@chingor13
Copy link
Contributor Author

@summer-ji-eng is adding a feature to override the quotaProjectId (x-goog-user-project) header. Within this repo, we can test that the builders are building the settings object (using FakeClientSettings). However, there is no FakeClient so we cannot instantiate a client and provide a testing Transport to ensure that the ClientContext is respecting the options we're configuring (and in the correct order).

Ideally, we can have these tests live in the gax repo as it's really testing gax, but it needs a generated client.

@meltsufin meltsufin added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Oct 12, 2022
@ddixit14 ddixit14 transferred this issue from googleapis/gax-java Feb 8, 2023
@ddixit14 ddixit14 added the gax label Feb 8, 2023
@meltsufin meltsufin added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gax priority: p3 Desirable enhancement or fix. May not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

6 participants