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

[conformance] Properly handle lifecycle of an externally passed gRPC client #3156

Open
gauravkghildiyal opened this issue Jun 13, 2024 · 1 comment
Assignees

Comments

@gauravkghildiyal
Copy link
Member

What would you like to be added:
This issue is for tracking the changes discussed in #3130 (comment)... tl;dr being that MakeRequestAndExpectEventuallyConsistentResponse() should not close an externally passed gRPC client.

Why this is needed:
The same client could be getting used across multiple tests in parallel. Closing the client should be the responsibility of the place where it was created (and not necessarily within the place where the client gets used)

/cc @snehachhabria

@mikemorris
Copy link
Contributor

mikemorris commented Jun 18, 2024

Makes sense to me - would this change just be moving the defer c.Close() one line up to within the if c == nil conditional and adding a test to confirm it doesn't get closed when a non-nil connection is passed in?

Is there a parallel concern for the HTTP helper too? I'd expect these should have consistent behavior.

/assign

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

No branches or pull requests

2 participants