Skip to content

Commit

Permalink
add more retries for setup and teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo committed Apr 8, 2020
1 parent 98fe9a0 commit ffbc116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monitoring/api/v3/alerts-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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(
Expand Down

0 comments on commit ffbc116

Please sign in to comment.