diff options
author | Eric Anderson <ejona86@gmail.com> | 2015-06-24 15:37:58 -0700 |
---|---|---|
committer | Eric Anderson <ejona86@gmail.com> | 2015-06-24 15:37:58 -0700 |
commit | e7324878a9122bc53e5101e835427557dee2f496 (patch) | |
tree | c7e62a68723efd2e29e9e6dc8ca9b9536807bbaf /test | |
parent | aff63409063221b233d0ffddaf157c7185ddc25e (diff) | |
parent | 7bce516b3b8632bfe8a7d1af9ae258ed37c93d7b (diff) |
Merge pull request #2148 from a11r/interops
Expanded testing protocol
Diffstat (limited to 'test')
-rw-r--r-- | test/proto/messages.proto | 27 | ||||
-rw-r--r-- | test/proto/test.proto | 8 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 65a8140465..500e79cc81 100644 --- a/test/proto/messages.proto +++ b/test/proto/messages.proto @@ -46,6 +46,14 @@ enum PayloadType { RANDOM = 2; } +// Compression algorithms +enum CompressionType { + // No compression + NONE = 0; + GZIP = 1; + DEFLATE = 2; +} + // A block of data, to simply increase gRPC message size. message Payload { // The type of data in body. @@ -54,6 +62,13 @@ message Payload { optional bytes body = 2; } +// A protobuf representation for grpc status. This is used by test +// clients to specify a status that the server should attempt to return. +message EchoStatus { + optional int32 code = 1; + optional string message = 2; +} + // Unary request. message SimpleRequest { // Desired payload type in the response from the server. @@ -72,6 +87,12 @@ message SimpleRequest { // Whether SimpleResponse should include OAuth scope. optional bool fill_oauth_scope = 5; + + // Compression algorithm to be used by the server for the response (stream) + optional CompressionType response_compression = 6; + + // Whether server should return a given status + optional EchoStatus response_status = 7; } // Unary response, as configured by the request. @@ -123,6 +144,12 @@ message StreamingOutputCallRequest { // Optional input payload sent along with the request. optional Payload payload = 3; + + // Compression algorithm to be used by the server for the response (stream) + optional CompressionType response_compression = 6; + + // Whether server should return a given status + optional EchoStatus response_status = 7; } // Server-streaming response, as configured by the request and parameters. diff --git a/test/proto/test.proto b/test/proto/test.proto index b9483d8437..1214152513 100644 --- a/test/proto/test.proto +++ b/test/proto/test.proto @@ -71,3 +71,11 @@ service TestService { rpc HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse); } + + +// A simple service NOT implemented at servers so clients can test for +// that case. +service UnimplementedService { + // A call that no server should implement + rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty); +} |