Expanded testing protocol

pull/2148/head
Abhishek Kumar 10 years ago
parent f3fac562e8
commit 905a65b2d0
  1. 28
      test/proto/messages.proto
  2. 8
      test/proto/test.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.

@ -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);
}

Loading…
Cancel
Save