diff options
author | Mark D. Roth <roth@google.com> | 2017-01-13 11:23:01 -0800 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2017-01-13 11:23:01 -0800 |
commit | e6bcd0ebc9c35581b5459d9cc186dd71a2d701c9 (patch) | |
tree | 9b273b5a4cf19be2c83fdff232fd9dc5e36b4f45 /src/python/grpcio_tests/tests/qps/benchmark_client.py | |
parent | c17ed124eca8fc6bed31c6e0d192fde386bdb3c2 (diff) | |
parent | 6b6954050cf0379dbbee90dd18313a3779e0dd52 (diff) |
Merge remote-tracking branch 'upstream/master' into revert-9063-revert-8951-revert-8949-revert-8922-slice_cleanup
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 |