interop: implement client_compressed_unary and server_compressed_unary tests - #9302
interop: implement client_compressed_unary and server_compressed_unary tests#9302om7057 wants to merge 2 commits into
Conversation
…y tests Updates grpc#1357 Adds the two unary compression interop tests from the interop test descriptions. DoClientCompressedUnaryCall exercises the probe step (an uncompressed request claiming expect_compressed=true must be rejected with INVALID_ARGUMENT) followed by correctly compressed and uncompressed calls. DoServerCompressedUnaryCall exercises the server honoring response_compressed on outbound messages. On the server side, UnaryCall now checks the incoming request's actual compression against ExpectCompressed via the ServerStream's RecvCompress, and sets the send compressor per ResponseCompressed via SetSendCompressor. The two streaming compression tests (client_compressed_streaming, server_compressed_streaming) are not included here since they need per-message compression control within a single stream, which is not yet available in the public API (see grpc#8662). RELEASE NOTES: * interop: Add client_compressed_unary and server_compressed_unary interop test cases
56a53b8 to
0ae72ce
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9302 +/- ##
==========================================
+ Coverage 83.11% 83.13% +0.01%
==========================================
Files 423 423
Lines 35231 35261 +30
==========================================
+ Hits 29284 29314 +30
- Misses 4432 4434 +2
+ Partials 1515 1513 -2 🚀 New features to boost your workflow:
|
Updates grpc#1357 Adds interop/compression_test.go, exercising DoClientCompressedUnaryCall and DoServerCompressedUnaryCall end-to-end against a real in-process server, following the same stubserver-based pattern already used by orcalb_test.go. Also adds a direct assertion that UnaryCall returns INVALID_ARGUMENT when a request's ExpectCompressed flag doesn't match the actual wire compression. RELEASE NOTES: n/a
|
@mbissa : Here are the description of the test cases: https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#client_compressed_unary and https://github.com/grpc/grpc/blob/master/doc/interop-test-descriptions.md#server_compressed_unary |
|
The tests (-race, latest) failure is unrelated to this PR. It fails in google.golang.org/grpc/orca on TestProducerMultipleListeners (a timing assertion, "timed out waiting for reports received"), a package this PR doesn't touch. That test is a known flake tracked in #6637. Would really appreciate a re-run. |
|
@mbissa just a small reminder on this one! |
Updates #1357
What this PR does
Adds the two unary compression interop tests from the interop test specification:
client_compressed_unaryserver_compressed_unaryDoClientCompressedUnaryCallcovers the expected request-side behavior: an uncompressed request withexpect_compressed=trueis rejected withINVALID_ARGUMENT, while correctly compressed and uncompressed requests succeed with the expected response.DoServerCompressedUnaryCallverifies that the server honors theresponse_compressedsetting when sending the response. The test doesn't inspect the wire-level compression flag because gRPC-Go doesn't currently expose a public per-RPC API for doing so, which the interop specification allows.On the server side,
UnaryCallnow checks the request's actual compression viaRecvCompressand applies the requested response compressor withSetSendCompressor.The streaming compression cases are intentionally not included here. They require changing compression on individual messages within a stream, which isn't currently supported by the public API. That work is being tracked in #8662.
Testing
go test -cpu 1,4 -timeout 7m ./interop/..../interop/interop_test.sh./scripts/vet.shAll passed locally.
RELEASE NOTES:
client_compressed_unaryandserver_compressed_unarytest cases