Actually create async generic server

pull/4907/head
vjpai 9 years ago
parent f955e54799
commit a00f998089
  1. 1
      src/proto/grpc/testing/control.proto
  2. 2
      test/cpp/qps/generic_async_streaming_ping_pong_test.cc
  3. 2
      test/cpp/qps/qps_driver.cc
  4. 2
      test/cpp/qps/qps_worker.cc
  5. 1
      test/cpp/qps/server.h

@ -42,6 +42,7 @@ enum ClientType {
enum ServerType {
SYNC_SERVER = 0;
ASYNC_SERVER = 1;
ASYNC_GENERIC_SERVER = 2;
}
enum RpcType {

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

@ -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,

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

@ -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

Loading…
Cancel
Save