From ae58f59e4ab1d0128c3e525cc505c0b648e23972 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 18 Jun 2015 15:54:54 -0700 Subject: [PATCH 1/5] Updtae interop test descriptions. custom_metadata, status_code_and_message and unimplemented_method are now ready for implementation and blocking beta release. --- doc/interop-test-descriptions.md | 35 ++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index c3da84377a9..3e85d1e8fb5 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -392,22 +392,24 @@ Asserts: * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response -### Metadata (TODO: fix name) +### custom_metadata -Status: Not yet implementable +Status: Ready for implementation, beta requirement. This test verifies that custom metadata in either binary or ascii format can be -sent in header and trailer. +sent as initial-metadata by the client and as both initial- and trailing-metadata +by the server. Server features: * [UnaryCall][] +* [FullDuplexCall][] * [Compressable Payload][] * Ability to receive custom metadata from client in header and send custom data - back to client in both header and trailer. (TODO: this is not defined) + back to client in both header and trailer. Procedure: 1. While sending custom metadata (ascii + binary) in the header, client calls - UnaryCall with: + UnaryCall with: ``` { @@ -418,21 +420,31 @@ Procedure: } } ``` +The client attaches custom metadat with the following keys: + ``` + "x-grpc-test-echo-initial" + or + "x-grpc-test-echo-trailing" + ``` + 2. Client repeats step 1. with FullDuplexCall instead of UnaryCall. Asserts: * call was successful -* custom metadata is echoed back in the response header. -* custom metadata is echoed back in the response trailer. +* metadata with key `"x-grpc-test-echo-initial"` is received in the initial metadata. +* metadata with key `"x-grpc-test-echo-trailing"` is received in the trailing metadata. + + ### status_code_and_message -Status: Not yet implementable +Status: Ready for implementation, beta requirement. This test verifies unary calls succeed in sending messages, and propagates back status code and message sent along with the messages. Server features: * [UnaryCall][] +* [FullDuplexCall][] Procedure: 1. Client calls UnaryCall with: @@ -445,6 +457,8 @@ Procedure: } } ``` +2. Client repeats step 1. with FullDuplexCall instead of UnaryCall. + Asserts: * received status code is the same with sent code @@ -452,10 +466,9 @@ Asserts: ### unimplemented_method -Status: Not yet implementable +Status: Ready for implementation. Blocking beta. -This test verifies calling unimplemented RPC method returns unimplemented -status. +This test verifies calling unimplemented RPC method returns the UNIMPLEMENTED status code. Procedure: * Client calls UnimplementedCall with: From 1bbdd02fa21a53a818b9e6f03426e18a2058d315 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 19 Jun 2015 09:43:09 -0700 Subject: [PATCH 2/5] Address review comments. Defined server side behavior needed to echo status code and message . Assorted minor fixes to spelling. --- doc/interop-test-descriptions.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 3e85d1e8fb5..4f32ab28220 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -409,7 +409,7 @@ Server features: Procedure: 1. While sending custom metadata (ascii + binary) in the header, client calls - UnaryCall with: + UnaryCall with: ``` { @@ -420,7 +420,7 @@ Procedure: } } ``` -The client attaches custom metadat with the following keys: +The client attaches custom metadata with the following keys: ``` "x-grpc-test-echo-initial" or @@ -445,6 +445,7 @@ status code and message sent along with the messages. Server features: * [UnaryCall][] * [FullDuplexCall][] +* [Echo Status][] Procedure: 1. Client calls UnaryCall with: @@ -694,6 +695,14 @@ 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 returns +exactly the status code and messsage contained within said response_status. This +can be used by clients to verify correct handling of different status codes and +associated status messages end-to-end. + + ### Observe ResponseParameters.interval_us [Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us From 0738dd41e44bc941859c83b63198fedce73f901b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 21 Jul 2015 11:30:59 -0700 Subject: [PATCH 3/5] Addressed review comments Added server feature spec to echo metadata. Clarified client spec for testing metadata. Removed Status for tests that are now ready for implementation. Modified the spec for UnimplementedCall to take an Empty request. --- doc/interop-test-descriptions.md | 39 +++++++++++++++----------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 4f32ab28220..41ebc6bbe8f 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -394,8 +394,6 @@ Asserts: ### custom_metadata -Status: Ready for implementation, beta requirement. - This test verifies that custom metadata in either binary or ascii format can be sent as initial-metadata by the client and as both initial- and trailing-metadata by the server. @@ -404,8 +402,7 @@ Server features: * [UnaryCall][] * [FullDuplexCall][] * [Compressable Payload][] -* Ability to receive custom metadata from client in header and send custom data - back to client in both header and trailer. +* [Echo Metadata][] Procedure: 1. While sending custom metadata (ascii + binary) in the header, client calls @@ -420,25 +417,22 @@ Procedure: } } ``` -The client attaches custom metadata with the following keys: +The client attaches custom metadata with the following keys and values: ``` - "x-grpc-test-echo-initial" - or - "x-grpc-test-echo-trailing" + key: "x-grpc-test-echo-initial", value: "test_initial_metadata_value" + key: "x-grpc-test-echo-trailing", value: 0xababab ``` 2. Client repeats step 1. with FullDuplexCall instead of UnaryCall. Asserts: * call was successful -* metadata with key `"x-grpc-test-echo-initial"` is received in the initial metadata. -* metadata with key `"x-grpc-test-echo-trailing"` is received in the trailing metadata. +* metadata with key `"x-grpc-test-echo-initial"` and value `"test_initial_metadata_value"`is received in the initial metadata. +* metadata with key `"x-grpc-test-echo-trailing"` and value `0xababab` is received in the trailing metadata. ### status_code_and_message -Status: Ready for implementation, beta requirement. - This test verifies unary calls succeed in sending messages, and propagates back status code and message sent along with the messages. @@ -472,15 +466,10 @@ Status: Ready for implementation. Blocking beta. This test verifies calling unimplemented RPC method returns the UNIMPLEMENTED status code. Procedure: -* Client calls UnimplementedCall with: +* Client calls UnimplementedCall with an empty request (defined as `grpc.testing.Empty`): ``` { - response_type: COMPRESSABLE - response_size: 314159 - payload:{ - body: 271828 bytes of zeros - } } ``` @@ -697,11 +686,19 @@ COMPRESSABLE. ### Echo Status [Echo Status]: #echo-status -When the client sends a response_status in the request payload, the server returns -exactly the status code and messsage contained within said response_status. This -can be used by clients to verify correct handling of different status codes and +When the client sends a response_status in the request payload, the server closes +the stream with the status code and messsage contained within said response_status. +The server will not process any further messages on the stream sent by the client. +This can be used by clients to verify correct handling of different status codes and associated status messages end-to-end. +### Echo Metadata +[Echo Metadata]: #echo-metadata +When the client sends metadata with the key `"x-grpc-test-echo-initial"` with its +request, the server sends back exactly this key and the corresponding value back to +the client as part of initial metadata. When the client sends metadata with the key +`"x-grpc-test-echo-trailing"` with its request, the server sends back exactly this +key and the corresponding value back to the client as trailing metadata. ### Observe ResponseParameters.interval_us [Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us From 10c7b16e47c4970b583b71f32d2cd44dfeb132a5 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 30 Jul 2015 10:36:00 -0700 Subject: [PATCH 4/5] Suffixed -bin, added service name --- doc/interop-test-descriptions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 6115fe15271..46cf7d59371 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -511,14 +511,14 @@ Procedure: The client attaches custom metadata with the following keys and values: ``` key: "x-grpc-test-echo-initial", value: "test_initial_metadata_value" - key: "x-grpc-test-echo-trailing", value: 0xababab + key: "x-grpc-test-echo-trailing-bin", value: 0xababab ``` 2. Client repeats step 1. with FullDuplexCall instead of UnaryCall. Asserts: * call was successful * metadata with key `"x-grpc-test-echo-initial"` and value `"test_initial_metadata_value"`is received in the initial metadata. -* metadata with key `"x-grpc-test-echo-trailing"` and value `0xababab` is received in the trailing metadata. +* metadata with key `"x-grpc-test-echo-trailing-bin"` and value `0xababab` is received in the trailing metadata. @@ -557,7 +557,7 @@ Status: Ready for implementation. Blocking beta. This test verifies calling unimplemented RPC method returns the UNIMPLEMENTED status code. Procedure: -* Client calls UnimplementedCall with an empty request (defined as `grpc.testing.Empty`): +* Client calls `grpc.testing.UnimplementedService/UnimplementedCall` with an empty request (defined as `grpc.testing.Empty`): ``` { From eaf9e87a08921c4bb932e404bb12eba323591e2b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 30 Jul 2015 12:01:20 -0700 Subject: [PATCH 5/5] Suffixed -bin for server descrioption of echo trailing metadata --- doc/interop-test-descriptions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 46cf7d59371..065e107c249 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -783,7 +783,7 @@ associated status messages end-to-end. When the client sends metadata with the key `"x-grpc-test-echo-initial"` with its request, the server sends back exactly this key and the corresponding value back to the client as part of initial metadata. When the client sends metadata with the key -`"x-grpc-test-echo-trailing"` with its request, the server sends back exactly this +`"x-grpc-test-echo-trailing-bin"` with its request, the server sends back exactly this key and the corresponding value back to the client as trailing metadata. ### Observe ResponseParameters.interval_us