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

Provide ability to disable gRPC client(s) using properties #212

Open
asarkar opened this issue Aug 31, 2020 · 0 comments
Open

Provide ability to disable gRPC client(s) using properties #212

asarkar opened this issue Aug 31, 2020 · 0 comments
Labels
info: good first issue Good for newcomers type: enhancement New feature or request

Comments

@asarkar
Copy link

asarkar commented Aug 31, 2020

I'd like to disable gRPC client(s) using properties, similar to that available for the server grpc.server.enabled=false. grpc.client.enabled=false would disable all gRPC client stub creation, and grpc.client.greeter.enabled=false would disable greeter client stub creation. The corresponding injection points (fields) would be Optional.empty or null if using Kotlin null type. If not Optional or null type, an exception would be thrown.

This allows for specific slices of the application to be tested. In my case, I've a client-A that calls service-A that calls client-B that calls external-service-B. Depending on the test scenario, I substitute in process versions for service-A and external-service-B to test the flow, or use the real ones.

What I'd like to do now is use the same test for calling service-A deployed in my integration environment. That means, I only need client-A, and service-A and client-B beans don't need to be created.

One way is to use Requires, but it makes the Production code coupled with test code, and also duplicates code.

@ilopmar ilopmar added the type: enhancement New feature or request label Sep 3, 2020
@graemerocher graemerocher added the info: good first issue Good for newcomers label Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info: good first issue Good for newcomers type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants