|
|
|
@ -991,8 +991,8 @@ def test_path_matching(gcp, original_backend_service, instance_group, |
|
|
|
|
original_backend_instances + alternate_backend_instances, |
|
|
|
|
_WAIT_FOR_STATS_SEC) |
|
|
|
|
|
|
|
|
|
retry_count = 20 |
|
|
|
|
# Each attempt takes about 10 seconds, 20 retries is equivalent to 200 |
|
|
|
|
retry_count = 40 |
|
|
|
|
# Each attempt takes about 10 seconds, 40 retries is equivalent to 400 |
|
|
|
|
# seconds timeout. |
|
|
|
|
for i in range(retry_count): |
|
|
|
|
stats = get_client_stats(_NUM_TEST_RPCS, _WAIT_FOR_STATS_SEC) |
|
|
|
@ -1004,6 +1004,10 @@ def test_path_matching(gcp, original_backend_service, instance_group, |
|
|
|
|
if compare_expected_instances(stats, expected_instances): |
|
|
|
|
logger.info("success") |
|
|
|
|
break |
|
|
|
|
elif i == retry_count - 1: |
|
|
|
|
raise Exception( |
|
|
|
|
'timeout waiting for RPCs to the expected instances: %s' |
|
|
|
|
% expected_instances) |
|
|
|
|
finally: |
|
|
|
|
patch_url_map_backend_service(gcp, original_backend_service) |
|
|
|
|
patch_backend_service(gcp, alternate_backend_service, []) |
|
|
|
@ -1121,8 +1125,8 @@ def test_header_matching(gcp, original_backend_service, instance_group, |
|
|
|
|
original_backend_instances + alternate_backend_instances, |
|
|
|
|
_WAIT_FOR_STATS_SEC) |
|
|
|
|
|
|
|
|
|
retry_count = 20 |
|
|
|
|
# Each attempt takes about 10 seconds, 10 retries is equivalent to 100 |
|
|
|
|
retry_count = 40 |
|
|
|
|
# Each attempt takes about 10 seconds, 40 retries is equivalent to 400 |
|
|
|
|
# seconds timeout. |
|
|
|
|
for i in range(retry_count): |
|
|
|
|
stats = get_client_stats(_NUM_TEST_RPCS, _WAIT_FOR_STATS_SEC) |
|
|
|
@ -1134,6 +1138,10 @@ def test_header_matching(gcp, original_backend_service, instance_group, |
|
|
|
|
if compare_expected_instances(stats, expected_instances): |
|
|
|
|
logger.info("success") |
|
|
|
|
break |
|
|
|
|
elif i == retry_count - 1: |
|
|
|
|
raise Exception( |
|
|
|
|
'timeout waiting for RPCs to the expected instances: %s' |
|
|
|
|
% expected_instances) |
|
|
|
|
finally: |
|
|
|
|
patch_url_map_backend_service(gcp, original_backend_service) |
|
|
|
|
patch_backend_service(gcp, alternate_backend_service, []) |
|
|
|
|