diff options
author | vjpai <vpai@google.com> | 2016-01-26 17:51:35 -0800 |
---|---|---|
committer | vjpai <vpai@google.com> | 2016-01-26 17:51:35 -0800 |
commit | a00f998089a641ed7cc059eb5d4ce52734ba2e3e (patch) | |
tree | fcf26e702b23f9b545e23d2ca2775d43900b4c4f | |
parent | f955e54799968c9aabb1f860549f88458e8b34a6 (diff) |
Actually create async generic server
-rw-r--r-- | src/proto/grpc/testing/control.proto | 1 | ||||
-rw-r--r-- | test/cpp/qps/generic_async_streaming_ping_pong_test.cc | 2 | ||||
-rw-r--r-- | test/cpp/qps/qps_driver.cc | 2 | ||||
-rw-r--r-- | test/cpp/qps/qps_worker.cc | 2 | ||||
-rw-r--r-- | test/cpp/qps/server.h | 1 |
5 files changed, 6 insertions, 2 deletions
diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 0784ebf91c..496108ab5f 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -42,6 +42,7 @@ enum ClientType { enum ServerType { SYNC_SERVER = 0; ASYNC_SERVER = 1; + ASYNC_GENERIC_SERVER = 2; } enum RpcType { diff --git a/test/cpp/qps/generic_async_streaming_ping_pong_test.cc b/test/cpp/qps/generic_async_streaming_ping_pong_test.cc index 2b2e1c820f..81c0f24103 100644 --- a/test/cpp/qps/generic_async_streaming_ping_pong_test.cc +++ b/test/cpp/qps/generic_async_streaming_ping_pong_test.cc @@ -60,7 +60,7 @@ static void RunGenericAsyncStreamingPingPong() { bbuf->set_req_size(0); ServerConfig server_config; - server_config.set_server_type(ASYNC_SERVER); + server_config.set_server_type(ASYNC_GENERIC_SERVER); server_config.set_host("localhost"); server_config.set_async_server_threads(1); diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc index e3e7cb296b..680e4b19b9 100644 --- a/test/cpp/qps/qps_driver.cc +++ b/test/cpp/qps/qps_driver.cc @@ -170,7 +170,7 @@ static void QpsDriver() { GPR_ASSERT(!client_config.payload_config().has_bytebuf_params() || (client_config.client_type() == ASYNC_CLIENT && client_config.rpc_type() == STREAMING && - server_config.server_type() == ASYNC_SERVER)); + server_config.server_type() == ASYNC_GENERIC_SERVER)); const auto result = RunScenario( client_config, FLAGS_num_clients, server_config, FLAGS_num_servers, diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index c0276d05b3..0bacc11b23 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -89,6 +89,8 @@ static std::unique_ptr<Server> CreateServer(const ServerConfig& config) { return CreateSynchronousServer(config); case ServerType::ASYNC_SERVER: return CreateAsyncServer(config); + case ServerType::ASYNC_GENERIC_SERVER: + return CreateAsyncGenericServer(config); default: abort(); } diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 32a3e85026..196fdac8f3 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -108,6 +108,7 @@ class Server { std::unique_ptr<Server> CreateSynchronousServer(const ServerConfig& config); std::unique_ptr<Server> CreateAsyncServer(const ServerConfig& config); +std::unique_ptr<Server> CreateAsyncGenericServer(const ServerConfig& config); } // namespace testing } // namespace grpc |