grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

http2_client is missing tests

Open jeanbza opened this issue 6 years ago • 16 comments

The following cases are untested, and should be tested:

  • https://github.com/grpc/grpc-go/blob/fb6867e42b4743663f07f4c7ce6c29c8d01247e1/internal/transport/http2_client.go#L275-L278

  • https://github.com/grpc/grpc-go/blob/fb6867e42b4743663f07f4c7ce6c29c8d01247e1/internal/transport/http2_client.go#L279-L282

  • https://github.com/grpc/grpc-go/blob/fb6867e42b4743663f07f4c7ce6c29c8d01247e1/internal/transport/http2_client.go#L298-L301

  • https://github.com/grpc/grpc-go/blob/fb6867e42b4743663f07f4c7ce6c29c8d01247e1/internal/transport/http2_client.go#L304-L307

e.g. changes in https://github.com/grpc/grpc-go/pull/2219 were almost merged that should not have because of lack of the aforementioned test coverage.

EDIT: Getting complete coverage for all network-related edge cases using only unit tests is difficult and can lead to fragile test suites.

We could instead write test cases for the http2_client in gRPC-Go that focus on edge cases involving unstable network connections. Specifically, we want to simulate connections that frequently disconnect during the connection phase and while making RPCs. These tests could help uncover various error paths that are currently uncovered, improving the robustness of gRPC-Go in real-world scenarios.

jeanbza avatar Jul 31 '18 21:07 jeanbza

@ginayeh I would like to contribute here

v-sreejith avatar Oct 19 '23 17:10 v-sreejith

Sure! Assigning it to you.

The original issue description might not be relevant anymore. I would re-evaluate the missed coverage of the file here.

arvindbr8 avatar Oct 19 '23 21:10 arvindbr8

@v-sreejith -- ping.. Are you still actively tracking this?

arvindbr8 avatar Feb 06 '24 23:02 arvindbr8