Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dgquintas committed Jun 15, 2016
1 parent dd8d84e commit 350c151
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
39 changes: 14 additions & 25 deletions doc/interop-test-descriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,10 @@ Client asserts:
### client_compressed_unary
This test verifies the client can compress unary messages. It sends an initial
inconsistent request to verify whether the server supports the
[CompressedRequest][] feature. If it does, it should catch the inconsistency and
fail the call with an `INVALID_ARGUMENT` status. If the feature is supported, it
proceeds with two unary calls, for compressed and uncompressed payloads.
This test verifies the client can compress unary messages by sending two unary
calls, for compressed and uncompressed payloads. It sends an initial probing
request to verify whether the server supports the [CompressedRequest][] feature.
If it doesn't, the call is expected to fail with an `INVALID_ARGUMENT` status.
Server features:
* [UnaryCall][]
Expand Down Expand Up @@ -140,14 +139,14 @@ Procedure:
calls were successful.
* Response payload body is 314159 bytes in size.
* Clients are free to assert that the response payload body contents are
zero and comparing the entire response message against a golden response.
zeros and comparing the entire response message against a golden response.
### server_compressed_unary
This test verifies the server can compress unary messages. It sends two unary
requests, expecting the server response to be
compressed or not according to the `response_compressed` boolean.
requests, expecting the server's response to be compressed or not according to
the `response_compressed` boolean.
Whether compression was actually performed is determined by the compression bit
in the response's message flags.
Expand All @@ -158,7 +157,7 @@ Server features:
* [CompressedResponse][]
Procedure:
1. Client calls UnaryCall with:
1. Client calls UnaryCall with `SimpleRequest`s:
```
{
Expand Down Expand Up @@ -257,7 +256,8 @@ compressed with `expect_compressed` true; the second one uncompressed with
Procedure:
1. Client calls StreamingInputCall
1. Client sends the following feature-probing *uncompressed* message
1. Client sends the following feature-probing *uncompressed*
`StreamingInputCallRequest` message
```
{
Expand Down Expand Up @@ -305,7 +305,7 @@ Server features:
* [StreamingOutputCall][]
Procedure:
1. Client calls StreamingOutputCall with:
1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`:
```
{
Expand Down Expand Up @@ -341,27 +341,16 @@ Server features:
Procedure:
1. Client calls StreamingOutputCall with:
```
{
response_compressed: true
response_parameters:{
size: 31415
}
response_parameters:{
size: 58979
}
}
```
1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`:
```
{
response_compressed: false
response_parameters:{
response_compressed: true
size: 31415
}
response_parameters:{
response_compressed: false
size: 58979
}
}
Expand Down
25 changes: 18 additions & 7 deletions src/proto/grpc/testing/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

syntax = "proto3";

import "google/protobuf/wrappers.proto";

package grpc.testing;

// DEPRECATED, don't use. To be removed shortly.
Expand Down Expand Up @@ -76,8 +78,11 @@ message SimpleRequest {
// Whether SimpleResponse should include OAuth scope.
bool fill_oauth_scope = 5;

// Whether to request the server to compress the response.
bool response_compressed = 6;
// Whether to request the server to compress the response. This field is
// "nullable" in order to interoperate seamlessly with clients not able to
// implement the full compression tests by introspecting the call to verify
// the response's compression status.
google.protobuf.BoolValue response_compressed = 6;

// Whether server should return a given status
EchoStatus response_status = 7;
Expand All @@ -102,8 +107,11 @@ message StreamingInputCallRequest {
// Optional input payload sent along with the request.
Payload payload = 1;

// Whether the server should expect this request to be compressed.
bool expect_compressed = 2;
// Whether the server should expect this request to be compressed. This field
// is "nullable" in order to interoperate seamlessly with servers not able to
// implement the full compression tests by introspecting the call to verify
// the request's compression status.
BoolValue expect_compressed = 2;

// Not expecting any payload from the response.
}
Expand All @@ -122,6 +130,12 @@ message ResponseParameters {
// Desired interval between consecutive responses in the response stream in
// microseconds.
int32 interval_us = 2;

// Whether to request the server to compress the response. This field is
// "nullable" in order to interoperate seamlessly with clients not able to
// implement the full compression tests by introspecting the call to verify
// the response's compression status.
BoolValue compressed = 3;
}

// Server-streaming request.
Expand All @@ -139,9 +153,6 @@ message StreamingOutputCallRequest {
// Optional input payload sent along with the request.
Payload payload = 3;

// Whether to request the server to compress the response.
bool response_compressed = 6;

// Whether server should return a given status
EchoStatus response_status = 7;
}
Expand Down

0 comments on commit 350c151

Please sign in to comment.