Merge pull request #22142 from ericgribkoff/add_timeout

set timeout on rpc call
pull/22163/head
Eric Gribkoff 5 years ago committed by GitHub
commit 6521dbacea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      tools/run_tests/run_xds_tests.py

@ -166,8 +166,11 @@ def get_client_stats(num_rpcs, timeout_sec):
request = messages_pb2.LoadBalancerStatsRequest()
request.num_rpcs = num_rpcs
request.timeout_sec = timeout_sec
rpc_timeout = timeout_sec * 2 # Allow time for connection establishment
try:
response = stub.GetClientStats(request, wait_for_ready=True)
response = stub.GetClientStats(request,
wait_for_ready=True,
timeout=rpc_timeout)
logger.debug('Invoked GetClientStats RPC: %s', response)
return response
except grpc.RpcError as rpc_error:

Loading…
Cancel
Save