Skip to content
Snippets Groups Projects
Commit f797c651 authored by Alexander Polcyn's avatar Alexander Polcyn
Browse files

make the change in scenario config rather than c#

parent d1c28669
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,8 @@ namespace Grpc.IntegrationTesting ...@@ -79,7 +79,8 @@ namespace Grpc.IntegrationTesting
ServerServiceDefinition service = null; ServerServiceDefinition service = null;
if (config.ServerType == ServerType.AsyncServer) if (config.ServerType == ServerType.AsyncServer)
{ {
Logger.Warning("ServerConfig.PayloadConfig is not supported for C# ServerType.AsyncServer. Ignoring the value"); GrpcPreconditions.CheckArgument(config.PayloadConfig == null,
"ServerConfig.PayloadConfig shouldn't be set for BenchmarkService based server.");
service = BenchmarkService.BindService(new BenchmarkServiceImpl()); service = BenchmarkService.BindService(new BenchmarkServiceImpl());
} }
else if (config.ServerType == ServerType.AsyncGenericServer) else if (config.ServerType == ServerType.AsyncGenericServer)
......
...@@ -139,7 +139,10 @@ message ServerConfig { ...@@ -139,7 +139,10 @@ message ServerConfig {
int32 async_server_threads = 7; int32 async_server_threads = 7;
// Specify the number of cores to limit server to, if desired // Specify the number of cores to limit server to, if desired
int32 core_limit = 8; int32 core_limit = 8;
// payload config, used in generic server // payload config, used in generic server.
// Note this must NOT be used in proto (non-generic) servers. For proto servers,
// 'response sizes' must be configured from the 'response_size' field of the
// 'SimpleRequest' objects in RPC requests.
PayloadConfig payload_config = 9; PayloadConfig payload_config = 9;
// Specify the cores we should run the server on, if desired // Specify the cores we should run the server on, if desired
......
...@@ -143,8 +143,9 @@ def _ping_pong_scenario(name, rpc_type, ...@@ -143,8 +143,9 @@ def _ping_pong_scenario(name, rpc_type,
if use_generic_payload: if use_generic_payload:
if server_type != 'ASYNC_GENERIC_SERVER': if server_type != 'ASYNC_GENERIC_SERVER':
raise Exception('Use ASYNC_GENERIC_SERVER for generic payload.') raise Exception('Use ASYNC_GENERIC_SERVER for generic payload.')
scenario['server_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size)
scenario['client_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size) scenario['client_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size)
scenario['server_config']['payload_config'] = _payload_type(use_generic_payload, req_size, resp_size)
if unconstrained_client: if unconstrained_client:
outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[unconstrained_client] outstanding_calls = outstanding if outstanding is not None else OUTSTANDING_REQUESTS[unconstrained_client]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment