From ffbc1167833a2193956ad06d10274d3cfbc81cfc Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 8 Apr 2020 15:48:47 -0700 Subject: [PATCH] add more retries for setup and teardown --- monitoring/api/v3/alerts-client/snippets_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitoring/api/v3/alerts-client/snippets_test.py b/monitoring/api/v3/alerts-client/snippets_test.py index 8b02e76b9c1b..ea18b2681244 100644 --- a/monitoring/api/v3/alerts-client/snippets_test.py +++ b/monitoring/api/v3/alerts-client/snippets_test.py @@ -64,7 +64,7 @@ def __init__(self): def __enter__(self): @retry(wait_exponential_multiplier=1000, wait_exponential_max=10000, - stop_max_attempt_number=5, retry_on_exception=retry_if_aborted) + stop_max_attempt_number=10, retry_on_exception=retry_if_aborted) def setup(): # Create a policy. policy = monitoring_v3.types.alert_pb2.AlertPolicy() @@ -89,7 +89,7 @@ def setup(): def __exit__(self, type, value, traceback): # Delete the policy and channel we created. @retry(wait_exponential_multiplier=1000, wait_exponential_max=10000, - stop_max_attempt_number=5, retry_on_exception=retry_if_aborted) + stop_max_attempt_number=10, retry_on_exception=retry_if_aborted) def teardown(): try: self.alert_policy_client.delete_alert_policy(