From 905a65b2d08a3a4876a9a2e9870dd53a792da963 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 19 Jun 2015 15:28:07 -0700 Subject: Expanded testing protocol --- test/proto/messages.proto | 28 ++++++++++++++++++++++++++++ test/proto/test.proto | 8 ++++++++ 2 files changed, 36 insertions(+) (limited to 'test') diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 65a8140465..35a73b4349 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,14 @@ 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 Status +{ + optional int code = 1; + optional string message = 2; +} + // Unary request. message SimpleRequest { // Desired payload type in the response from the server. @@ -72,6 +88,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 Status response_status = 7; } // Unary response, as configured by the request. @@ -123,6 +145,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 Status 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..b493dcd049 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); +} -- cgit v1.2.3 From 747cdbf9c031e4cfb5d792ddac51c9ad15749674 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 19 Jun 2015 15:53:37 -0700 Subject: Fixed bug : int -> int32 --- test/proto/messages.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 35a73b4349..63ce737f7d 100644 --- a/test/proto/messages.proto +++ b/test/proto/messages.proto @@ -64,9 +64,8 @@ message Payload { // A protobuf representation for grpc status. This is used by test // clients to specify a status that the server should attempt to return. -message Status -{ - optional int code = 1; +message Status { + optional int32 code = 1; optional string message = 2; } -- cgit v1.2.3 From eb6b216004d5c8b34fc8db9591b0e4696abd7d02 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 23 Jun 2015 09:52:50 -0700 Subject: Rename Status -> EchoStatus to avoid conflict --- test/proto/messages.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/proto/messages.proto b/test/proto/messages.proto index 63ce737f7d..500e79cc81 100644 --- a/test/proto/messages.proto +++ b/test/proto/messages.proto @@ -64,7 +64,7 @@ message Payload { // A protobuf representation for grpc status. This is used by test // clients to specify a status that the server should attempt to return. -message Status { +message EchoStatus { optional int32 code = 1; optional string message = 2; } @@ -92,7 +92,7 @@ message SimpleRequest { optional CompressionType response_compression = 6; // Whether server should return a given status - optional Status response_status = 7; + optional EchoStatus response_status = 7; } // Unary response, as configured by the request. @@ -149,7 +149,7 @@ message StreamingOutputCallRequest { optional CompressionType response_compression = 6; // Whether server should return a given status - optional Status response_status = 7; + optional EchoStatus response_status = 7; } // Server-streaming response, as configured by the request and parameters. -- cgit v1.2.3 From 7bce516b3b8632bfe8a7d1af9ae258ed37c93d7b Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 24 Jun 2015 15:36:40 -0700 Subject: Spelling fix: UnImplementedService -> UnimplementedService --- test/proto/test.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/proto/test.proto b/test/proto/test.proto index b493dcd049..1214152513 100644 --- a/test/proto/test.proto +++ b/test/proto/test.proto @@ -75,7 +75,7 @@ service TestService { // A simple service NOT implemented at servers so clients can test for // that case. -service UnImplementedService { +service UnimplementedService { // A call that no server should implement rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty); } -- cgit v1.2.3