Skip to content

Commit

Permalink
fix(monitoring): retry in the test setup (#4702)
Browse files Browse the repository at this point in the history
fixes #4687
fixes #4688
fixes #4689
fixes #4690
  • Loading branch information
Takashi Matsuo authored Sep 18, 2020
1 parent cacc0c7 commit 03a820f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion monitoring/api/v3/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import re

import backoff
from google.api_core.exceptions import InternalServerError
from google.api_core.exceptions import NotFound
import pytest

Expand All @@ -42,7 +43,12 @@ def custom_metric_descriptor(capsys):

@pytest.fixture(scope="module")
def write_time_series():
snippets.write_time_series(PROJECT_ID)

@backoff.on_exception(backoff.expo, InternalServerError, max_time=120)
def write():
snippets.write_time_series(PROJECT_ID)

write()
yield


Expand Down

0 comments on commit 03a820f

Please sign in to comment.