aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/qps/benchmark_client.py
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-01-13 11:23:01 -0800
committerGravatar Mark D. Roth <roth@google.com>2017-01-13 11:23:01 -0800
commite6bcd0ebc9c35581b5459d9cc186dd71a2d701c9 (patch)
tree9b273b5a4cf19be2c83fdff232fd9dc5e36b4f45 /src/python/grpcio_tests/tests/qps/benchmark_client.py
parentc17ed124eca8fc6bed31c6e0d192fde386bdb3c2 (diff)
parent6b6954050cf0379dbbee90dd18313a3779e0dd52 (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.py8
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