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

Implementation of service-testing helpers. #2452

Closed
wants to merge 9 commits into from
Closed

Conversation

ARR4N
Copy link

@ARR4N ARR4N commented Nov 12, 2018

End-to-end testing of services should be performed with a full gRPC stack, registered on a Server and connected to via ClientConn. This is a convenience package to abstract the boilerplate code associated with this setup.

Includes a Tester wrapper around creating a grpc.Server communicating over a bufconn.Listener rather than a loopback TCP connection. The Tester can either be used directly if multiple services need to be registered, or via the NewClientConn() function which handles all setup and teardown.

As the ServiceDesc variables of generated proto files are not exported, this package accepts the RegisterXServer function along with its respective implementation, and calls the former with reflection.

ARR4N and others added 4 commits November 12, 2018 20:39
End-to-end testing of services with interceptors should be performed with a full
gRPC stack, registered on a Server. This is a convenience package to abstract
the boilerplate code associated with this setup.

Includes a convenience wrapper around creating a grpc.Server communicating over
a bufconn.Listener rather than a loopback TCP connection. The Tester can either
be used directly if multiple services need to be registered, or via the
NewClientConn() function which handles all setup and teardown.
End-to-end testing of services with interceptors should be performed with a full
gRPC stack, registered on a Server. This is a convenience package to abstract
the boilerplate code associated with this setup.

Includes a convenience wrapper around creating a grpc.Server communicating over
a bufconn.Listener rather than a loopback TCP connection. The Tester can either
be used directly if multiple services need to be registered, or via the
NewClientConn() function which handles all setup and teardown.
@thelinuxfoundation
Copy link

Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement.

After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.

Regards,
CLA GitHub bot

@dfawley
Copy link
Member

dfawley commented Nov 21, 2018

@aschlosberg thank you for the contribution.

Unfortunately, this is not something we would like to accept at this time. As discussed previously in a similar PR (#2186), I don't believe the native grpc API for creating and connecting to a server is sufficiently complicated to require a wrapper library. Wrapper libraries introduce the burden of learning another API, so it must be justified by hiding significant complexity in what it wraps. In addition, the process for testing a grpc service should be even simpler once we have implemented the in-process transport (after grpc/proposal#103 is done).

If you are interesting in contributing to grpc-go, we do have a number of open issues tagged "Help Wanted". Please feel free to peruse the list and drop a comment in anything that sounds interesting and we can help make sure the issue is still relevant and provide any guidance needed to get you up to speed on it. Thanks!

@dfawley dfawley closed this Nov 21, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants