wait for backend health first

pull/21869/head
Eric Gribkoff 5 years ago
parent 31fa9550e5
commit 1e75218905
  1. 20
      tools/run_tests/run_xds_tests.py

@ -510,6 +510,16 @@ try:
else: else:
raise http_error raise http_error
if instance_group_url is None:
# Look up the instance group URL, which may be unset if we are running
# with --tolerate_gcp_errors=true.
result = compute.instanceGroups().get(
project=PROJECT_ID, zone=ZONE,
instanceGroup=INSTANCE_GROUP_NAME).execute()
instance_group_url = result['selfLink']
wait_for_healthy_backends(compute, PROJECT_ID, BACKEND_SERVICE_NAME,
instance_group_url, WAIT_FOR_BACKEND_SEC)
backends = [] backends = []
result = compute.instanceGroups().listInstances( result = compute.instanceGroups().listInstances(
project=PROJECT_ID, project=PROJECT_ID,
@ -526,16 +536,6 @@ try:
instance_name = item['instance'].split('/')[-1] instance_name = item['instance'].split('/')[-1]
backends.append(instance_name) backends.append(instance_name)
if instance_group_url is None:
# Look up the instance group URL, which may be unset if we are running
# with --tolerate_gcp_errors=true.
result = compute.instanceGroups().get(
project=PROJECT_ID, zone=ZONE,
instanceGroup=INSTANCE_GROUP_NAME).execute()
instance_group_url = result['selfLink']
wait_for_healthy_backends(compute, PROJECT_ID, BACKEND_SERVICE_NAME,
instance_group_url, WAIT_FOR_BACKEND_SEC)
# Start xDS client # Start xDS client
cmd = CLIENT_CMD.format(service_host=SERVICE_HOST, cmd = CLIENT_CMD.format(service_host=SERVICE_HOST,
service_port=SERVICE_PORT, service_port=SERVICE_PORT,

Loading…
Cancel
Save