GRPC Core
43.0.0
|
Client and server use test.proto.
The code for the custom http2 server can be found here. It is responsible for handling requests and sending responses, and also for fulfilling the behavior of each particular test case.
Server should accept these arguments:
Clients implement test cases that test certain functionality. Each client is provided the test case it is expected to run as a command-line parameter. Names should be lowercase and without spaces.
Clients should accept these arguments:
Note that the server and client must be invoked with the same test case or else the test will be meaningless. For convenience, we provide a shell script wrapper that invokes both server and client at the same time, with the same test_case. This is the preferred way to run these tests.
This test verifies that the client correctly responds to a goaway sent by the server. The client should handle the goaway by switching to a new stream without the user application having to do a thing.
Client Procedure:
Client sends two UnaryCall requests (and sleeps for 1 second in-between). TODO: resolve 9300 and remove the 1 second sleep
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
Server asserts:
This test verifies that the client fails correctly when the server sends a RST_STREAM immediately after sending headers to the client.
Procedure:
Client sends UnaryCall with:
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
At the moment the error code and message returned are not standardized throughout all languages. Those checks will be added once all client languages behave the same way. #9142 is in flight.
This test verifies that the client fails "correctly" when the server sends a RST_STREAM halfway through sending data to the client.
Procedure:
Client sends UnaryCall with:
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
This test verifies that the client fails "correctly" when the server sends a RST_STREAM after sending all of the data to the client.
Procedure:
Client sends UnaryCall with:
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
Certain client languages allow the data to be accessed even though a RST_STREAM was encountered. Once all client languages behave this way, checks will be added on the incoming data.
This test verifies that the client correctly acknowledges all pings it gets from the server.
Procedure:
Client sends UnaryCall with:
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
Server Asserts:
This test verifies that the client observes the MAX_CONCURRENT_STREAMS limit set by the server.
Client Procedure:
Client Asserts:
Server Procedure:
The assertion that the MAX_CONCURRENT_STREAMS limit is upheld occurs in the http2 library we used.
This test verifies that the client can correctly receive padded http2 data frames. It also stresses the client's flow control (there is a high chance that the sender will deadlock if the client's flow control logic doesn't correctly account for padding).
Client Procedure: (Note this is the same procedure as in the "large_unary" gRPC interop tests. Clients should use their "large_unary" gRPC interop test implementations.) Procedure:
Client calls UnaryCall with:
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
SimpleResponse
, with a payload body length of SimpleRequest.response_size
. But send it across specific http2 data frames as follows:This test verifies that the client can correctly receive a series of small data frames. Note that this test is intentionally a slight variation of "data_frame_padding", with the only difference being that this test doesn't use data frame padding when the response is sent. This test is primarily meant to prove correctness of the http2 server implementation and highlight failures of the "data_frame_padding" test.
Client Procedure: (Note this is the same procedure as in the "large_unary" gRPC interop tests. Clients should use their "large_unary" gRPC interop test implementations.) Procedure:
Client calls UnaryCall with:
``` { response_size: 314159 payload:{ body: 271828 bytes of zeros } } ```
Client asserts:
Server Procedure:
SimpleResponse
, with a payload body length of SimpleRequest.response_size
. But send it across series of http2 data frames that contain 5 bytes of "payload" and zero bytes of "padding" (the padding flags on the data frames should not be set).