diff options
author | 2017-01-11 13:13:23 -0800 | |
---|---|---|
committer | 2017-01-11 13:13:23 -0800 | |
commit | 8a7a4462b1e967661f0eb8a348eef8536dd6e2e9 (patch) | |
tree | f1c07c3481461ad0db4068d3ada87905168b3472 /src/python/grpcio_tests/tests/qps/benchmark_client.py | |
parent | 26d20a8016feaeb0a2fe182505ee60960fb03275 (diff) | |
parent | 3c42128a350f4e153cd3f098fa6b928addb99c58 (diff) |
merge with head
Diffstat (limited to 'src/python/grpcio_tests/tests/qps/benchmark_client.py')
-rw-r--r-- | src/python/grpcio_tests/tests/qps/benchmark_client.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/python/grpcio_tests/tests/qps/benchmark_client.py b/src/python/grpcio_tests/tests/qps/benchmark_client.py index 83b46c914e..650e4756e7 100644 --- a/src/python/grpcio_tests/tests/qps/benchmark_client.py +++ b/src/python/grpcio_tests/tests/qps/benchmark_client.py @@ -68,12 +68,8 @@ class BenchmarkClient: else: channel = grpc.insecure_channel(server) - connected_event = threading.Event() - def wait_for_ready(connectivity): - if connectivity == grpc.ChannelConnectivity.READY: - connected_event.set() - channel.subscribe(wait_for_ready, try_to_connect=True) - connected_event.wait() + # waits for the channel to be ready before we start sending messages + grpc.channel_ready_future(channel).result() if config.payload_config.WhichOneof('payload') == 'simple_params': self._generic = False |