spec comments addressed

pull/6839/head
David Garcia Quintas 9 years ago
parent 7b3fa9e54f
commit dd8d84ebb5
  1. 212
      doc/interop-test-descriptions.md
  2. 20
      src/proto/grpc/testing/messages.proto

@ -68,14 +68,12 @@ control (even if compression is enabled on the channel).
Server features:
* [UnaryCall][]
* [Compressable Payload][]
Procedure:
1. Client calls UnaryCall with:
```
{
response_type: COMPRESSABLE
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -85,29 +83,39 @@ Procedure:
Client asserts:
* call was successful
* response payload type is COMPRESSABLE
* 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
### client_compressed_unary
This test verifies the client can compress unary messages. It sends two
unary requests with their payloads marked as COMPRESSABLE. One request will be
sent compressed and its `expect_compressed_request` set to true. Conversely for
the uncompressed case.
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.
Server features:
* [UnaryCall][]
* [Compressed Request][]
* [CompressedRequest][]
Procedure:
1. Client calls UnaryCall with:
1. Client calls UnaryCall with the feature probe, an **uncompressed** message:
```
{
expect_compressed: false
response_size: 314159
payload:{
body: 271828 bytes of zeros
}
}
```
1. Client calls UnaryCall with the *compressed* message:
```
{
expect_compressed_request: true
response_type: COMPRESSABLE
expect_compressed: true
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -115,10 +123,11 @@ Procedure:
}
```
1. Client calls UnaryCall with the *uncompressed* message:
```
{
expect_compressed_request: false
response_type: COMPRESSABLE
expect_compressed: false
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -127,22 +136,18 @@ Procedure:
```
Client asserts:
* call was successful
* response payload type is COMPRESSABLE
* if `request_compressed_response` is false, the response MUST NOT have the
compressed message flag set.
* if `request_compressed_response` is true, the response MUST have the
compressed message flag set.
* 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
* First call was unsuccessful with `INVALID_ARGUMENT` status. Subsequent
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.
### server_compressed_unary
This test verifies the server can compress unary messages. It sends two unary
requests for a COMPRESSABLE payload type, expecting the server response to be
compressed or not according to the `request_compressed_response` boolean.
requests, expecting the server 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.
@ -150,16 +155,14 @@ in the response's message flags.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* [Compressed Response][]
* [CompressedResponse][]
Procedure:
1. Client calls UnaryCall with:
```
{
request_compressed_response: true
response_type: COMPRESSABLE
response_compressed: true
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -169,8 +172,7 @@ Procedure:
```
{
request_compressed_response: false
response_type: COMPRESSABLE
response_compressed: false
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -179,10 +181,9 @@ Procedure:
```
Client asserts:
* call was successful
* response payload type is COMPRESSABLE
* when `request_compressed_response` is true, the response MUST have the
* when `response_compressed` is true, the response MUST have the
compressed message flag set.
* when `request_compressed_response` is false, the response MUST NOT have
* when `response_compressed` is false, the response MUST NOT have
the compressed message flag set.
* response payload body is 314159 bytes in size
* clients are free to assert that the response payload body contents are
@ -195,7 +196,6 @@ This test verifies that client-only streaming succeeds.
Server features:
* [StreamingInputCall][]
* [Compressable Payload][]
Procedure:
1. Client calls StreamingInputCall
@ -245,20 +245,70 @@ Client asserts:
* call was successful
* response aggregated_payload_size is 74922
### client_compressed_streaming
This test verifies the client can compress streaming messages. It sends an
initial inconsistent streaming call comprised of a single message to verify if
the server implements the [CompressedRequest][] feature. If it does, the client
will then send another streaming call, comprised of two messages: the first one
compressed with `expect_compressed` true; the second one uncompressed with
`expected_compressed` false.
Procedure:
1. Client calls StreamingInputCall
1. Client sends the following feature-probing *uncompressed* message
```
{
expect_compressed: true
payload:{
body: 27182 bytes of zeros
}
}
```
If the call fails with `INVALID_ARGUMENT`, the test fails. Otherwise, we
continue.
1. Client then sends the *compressed* message
```
{
expect_compressed: true
payload:{
body: 27182 bytes of zeros
}
}
```
1. And finally, the *uncompressed* message:
```
{
expect_compressed: false
payload:{
body: 45904 bytes of zeros
}
}
```
1. Client half-closes
Client asserts:
* First call was unsuccessful with `INVALID_ARGUMENT` status. Subsequent
calls were successful.
* Response aggregated_payload_size is 73086.
### server_streaming
This test verifies that server-only streaming succeeds.
Server features:
* [StreamingOutputCall][]
* [Compressable Payload][]
Procedure:
1. Client calls StreamingOutputCall with:
```
{
response_type:COMPRESSABLE
response_parameters:{
size: 31415
}
@ -277,7 +327,6 @@ Procedure:
Client asserts:
* call was successful
* exactly four responses
* response payloads are COMPRESSABLE
* response payload bodies are sized (in order): 31415, 9, 2653, 58979
* clients are free to assert that the response payload body contents are zero
and comparing the entire response messages against golden responses
@ -288,8 +337,7 @@ This test verifies that the server can compress streaming messages.
Server features:
* [StreamingOutputCall][]
* [Compressable Payload][]
* [Compressed Response][]
* [CompressedResponse][]
Procedure:
@ -297,8 +345,7 @@ Procedure:
```
{
request_compressed_response: true
response_type:COMPRESSABLE
response_compressed: true
response_parameters:{
size: 31415
}
@ -310,8 +357,7 @@ Procedure:
```
{
request_compressed_response: false
response_type:COMPRESSABLE
response_compressed: false
response_parameters:{
size: 31415
}
@ -324,69 +370,27 @@ Procedure:
Client asserts:
* call was successful
* exactly two responses
* response payloads are COMPRESSABLE
* when `request_compressed_response` is false, the response's messages MUST
* when `response_compressed` is false, the response's messages MUST
NOT have the compressed message flag set.
* when `request_compressed_response` is true, the response's messages MUST
* when `response_compressed` is true, the response's messages MUST
have the compressed message flag set.
* response payload bodies are sized (in order): 31415, 58979
* clients are free to assert that the response payload body contents are
zero and comparing the entire response messages against golden responses
### client_compressed_streaming
This test verifies that the client can compress streaming messages.
Server features:
* [StreamingInputCall][]
* [Compressed Request][]
Procedure:
1. Client calls StreamingInputCall
1. Client sends:
```
{
expect_compressed_request: true
payload:{
body: 27182 bytes of zeros
}
}
```
1. Client then sends:
```
{
expect_compressed_request: false
payload:{
body: 45904 bytes of zeros
}
}
```
6. Client half-closes
Client asserts:
* call was successful
* response aggregated_payload_size is 73086
### ping_pong
This test verifies that full duplex bidi is supported.
Server features:
* [FullDuplexCall][]
* [Compressable Payload][]
Procedure:
1. Client calls FullDuplexCall with:
```
{
response_type: COMPRESSABLE
response_parameters:{
size: 31415
}
@ -400,7 +404,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_parameters:{
size: 9
}
@ -414,7 +417,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_parameters:{
size: 2653
}
@ -428,7 +430,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_parameters:{
size: 58979
}
@ -443,7 +444,6 @@ Procedure:
Client asserts:
* call was successful
* exactly four responses
* response payloads are COMPRESSABLE
* response payload bodies are sized (in order): 31415, 9, 2653, 58979
* clients are free to assert that the response payload body contents are zero
and comparing the entire response messages against golden responses
@ -479,7 +479,6 @@ be passed in as `--oauth_scope`.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
@ -489,7 +488,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -523,7 +521,6 @@ variable GOOGLE_APPLICATION_CREDENTIALS.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
@ -533,7 +530,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -578,7 +574,6 @@ should be passed as the `--oauth_scope`.
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
@ -621,7 +616,6 @@ against grpc-test.sandbox.googleapis.com, oauth scope
Server features:
* [UnaryCall][]
* [Compressable Payload][]
* [Echo Authenticated Username][]
* [Echo OAuth Scope][]
@ -652,7 +646,6 @@ by the server.
Server features:
* [UnaryCall][]
* [FullDuplexCall][]
* [Compressable Payload][]
* [Echo Metadata][]
Procedure:
@ -667,7 +660,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -686,7 +678,6 @@ Procedure:
```
{
response_type: COMPRESSABLE
response_size: 314159
payload:{
body: 271828 bytes of zeros
@ -792,14 +783,12 @@ from the server.
Server features:
* [FullDuplexCall][]
* [Compressable Payload][]
Procedure:
1. Client starts FullDuplexCall with
```
{
response_type: COMPRESSABLE
response_parameters:{
size: 31415
}
@ -946,15 +935,17 @@ for the `SimpleRequest.response_type`. If the server does not support the
### CompressedResponse
[CompressedResponse]: #compressedresponse
When the client sets `SimpleRequest.request_compressed_response` to true, the
response is sent back compressed.
When the client sets `response_compressed` to true, the server's response is
sent back compressed. Note that `response_compressed` is present on both
`SimpleRequest` (unary) and `StreamingOutputCallRequest` (streaming).
### CompressedRequest
[CompressedRequest]: #compressedrequest
When the client sets `SimpleRequest.expect_compressed_request ` to true, the
server expects the client request to be compressed. If it's not, it fails
the RPC with `INVALID_ARGUMENT`.
When the client sets `expect_compressed` to true, the server expects the client
request to be compressed. If it's not, it fails the RPC with `INVALID_ARGUMENT`.
Note that `response_compressed` is present on both `SimpleRequest` (unary) and
`StreamingOutputCallRequest` (streaming).
### StreamingInputCall
[StreamingInputCall]: #streaminginputcall
@ -982,13 +973,6 @@ payload body of size ResponseParameters.size bytes, as specified by its
respective ResponseParameters. After receiving half close and sending all
responses, it closes with OK.
### Compressable Payload
[Compressable Payload]: #compressable-payload
When the client requests COMPRESSABLE payload, the response includes a payload
of the size requested containing all zeros and the payload type is
COMPRESSABLE.
### Echo Status
[Echo Status]: #echo-status
When the client sends a response_status in the request payload, the server closes

@ -34,6 +34,7 @@ syntax = "proto3";
package grpc.testing;
// DEPRECATED, don't use. To be removed shortly.
// The type of payload that should be returned.
enum PayloadType {
// Compressable text format.
@ -42,6 +43,7 @@ enum PayloadType {
// A block of data, to simply increase gRPC message size.
message Payload {
// DEPRECATED, don't use. To be removed shortly.
// The type of data in body.
PayloadType type = 1;
// Primary contents of payload.
@ -57,12 +59,12 @@ message EchoStatus {
// Unary request.
message SimpleRequest {
// DEPRECATED, don't use. To be removed shortly.
// Desired payload type in the response from the server.
// If response_type is RANDOM, server randomly chooses one from other formats.
PayloadType response_type = 1;
// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
int32 response_size = 2;
// Optional input payload sent along with the request.
@ -75,16 +77,13 @@ message SimpleRequest {
bool fill_oauth_scope = 5;
// Whether to request the server to compress the response.
bool request_compressed_response = 6;
bool response_compressed = 6;
// Whether server should return a given status
EchoStatus response_status = 7;
// Whether the server should expect this request to be compressed.
bool expect_compressed_request = 8;
// The type of payload.
PayloadType payload_type = 9;
bool expect_compressed = 8;
}
// Unary response, as configured by the request.
@ -103,11 +102,8 @@ message StreamingInputCallRequest {
// Optional input payload sent along with the request.
Payload payload = 1;
// The type of payload.
PayloadType payload_type = 2;
// Whether the server should expect this request to be compressed.
bool expect_compressed_request = 3;
bool expect_compressed = 2;
// Not expecting any payload from the response.
}
@ -121,7 +117,6 @@ message StreamingInputCallResponse {
// Configuration for a particular response.
message ResponseParameters {
// Desired payload sizes in responses from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
int32 size = 1;
// Desired interval between consecutive responses in the response stream in
@ -131,6 +126,7 @@ message ResponseParameters {
// Server-streaming request.
message StreamingOutputCallRequest {
// DEPRECATED, don't use. To be removed shortly.
// Desired payload type in the response from the server.
// If response_type is RANDOM, the payload from each response in the stream
// might be of different types. This is to simulate a mixed type of payload
@ -144,7 +140,7 @@ message StreamingOutputCallRequest {
Payload payload = 3;
// Whether to request the server to compress the response.
bool request_compressed_response = 4;
bool response_compressed = 6;
// Whether server should return a given status
EchoStatus response_status = 7;

Loading…
Cancel
Save