From ae44213482b7513aa1516ecf1d3fb59395ff7942 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 4 Feb 2020 11:35:04 -0800 Subject: [PATCH] Fix typos in worker_servicer.py --- .../grpcio_tests/tests_aio/benchmark/worker_servicer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py b/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py index d69f21d3301..34609539952 100644 --- a/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py +++ b/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py @@ -95,7 +95,7 @@ def _create_client(server: str, config: control_pb2.ClientConfig, qps_data: hist if config.client_type == control_pb2.ASYNC_CLIENT: if config.rpc_type == control_pb2.UNARY: client_type = benchmark_client.UnaryAsyncBenchmarkClient - if config.rpc_type == control_pb2.STREAMING: + elif config.rpc_type == control_pb2.STREAMING: client_type = benchmark_client.StreamingAsyncBenchmarkClient else: raise NotImplementedError(f'Unsupported rpc_type [{config.rpc_type}]') @@ -126,7 +126,7 @@ class WorkerServicer(worker_service_pb2_grpc.WorkerServiceServicer): if request.mark.reset: start_time = end_time yield status - server.stop(None) + await server.stop(None) async def RunClient(self, request_iterator, context): config = (await context.read()).setup