Open gauravkghildiyal opened 2 weeks ago
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
What would you like to be added: This issue is for tracking the changes discussed in https://github.com/kubernetes-sigs/gateway-api/pull/3130#discussion_r1635872850... 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