diff options
author | 2015-01-08 15:39:58 -0800 | |
---|---|---|
committer | 2015-01-09 17:54:03 -0800 | |
commit | 1456d1522172e558b7c826b4d4b0977b67f43e82 (patch) | |
tree | 21b769d8958faf30b624b54048057e43632f2527 /test/cpp/util | |
parent | 24200d3cbca2a08c7a2b15b93f1c63efb786367d (diff) |
Add a test to export two TestService on the same server, only with different
package names. Make sure they work as intended.
This is based on []
Change on 2015/01/08 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83558743
Diffstat (limited to 'test/cpp/util')
-rw-r--r-- | test/cpp/util/echo.proto | 20 | ||||
-rw-r--r-- | test/cpp/util/echo_duplicate.proto | 12 | ||||
-rw-r--r-- | test/cpp/util/messages.proto | 21 |
3 files changed, 35 insertions, 18 deletions
diff --git a/test/cpp/util/echo.proto b/test/cpp/util/echo.proto index 1240399bf8..bd5357fe19 100644 --- a/test/cpp/util/echo.proto +++ b/test/cpp/util/echo.proto @@ -1,24 +1,8 @@ syntax = "proto2"; -package grpc.cpp.test.util; - -message RequestParams { - optional bool echo_deadline = 1; -} - -message EchoRequest { - optional string message = 1; - optional RequestParams param = 2; -} +import "test/cpp/util/messages.proto"; -message ResponseParams { - optional int64 request_deadline = 1; -} - -message EchoResponse { - optional string message = 1; - optional ResponseParams param = 2; -} +package grpc.cpp.test.util; service TestService { rpc Echo(EchoRequest) returns (EchoResponse); diff --git a/test/cpp/util/echo_duplicate.proto b/test/cpp/util/echo_duplicate.proto new file mode 100644 index 0000000000..c9266833e2 --- /dev/null +++ b/test/cpp/util/echo_duplicate.proto @@ -0,0 +1,12 @@ +// This is a partial copy of echo.proto with a different package name. + +syntax = "proto2"; + +import "test/cpp/util/messages.proto"; + +package grpc.cpp.test.util.duplicate; + +service TestService { + rpc Echo(grpc.cpp.test.util.EchoRequest) + returns (grpc.cpp.test.util.EchoResponse); +} diff --git a/test/cpp/util/messages.proto b/test/cpp/util/messages.proto new file mode 100644 index 0000000000..d541821b65 --- /dev/null +++ b/test/cpp/util/messages.proto @@ -0,0 +1,21 @@ +syntax = "proto2"; + +package grpc.cpp.test.util; + +message RequestParams { + optional bool echo_deadline = 1; +} + +message EchoRequest { + optional string message = 1; + optional RequestParams param = 2; +} + +message ResponseParams { + optional int64 request_deadline = 1; +} + +message EchoResponse { + optional string message = 1; + optional ResponseParams param = 2; +} |