Skip to content

Commit

Permalink
testing(videointelligence): retry harder upon 409s [(#4361)](GoogleCl…
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Matsuo authored and danoscarmike committed Sep 30, 2020
1 parent 9db082a commit 07cf916
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import os
import uuid

import backoff
from google.api_core.exceptions import Conflict
from google.cloud import storage
import pytest
from six.moves.urllib.request import urlopen
Expand Down Expand Up @@ -59,8 +61,13 @@ def bucket():

yield bucket

# Teardown.
bucket.delete(force=True)
# Teardown. We're occasionally seeing 409 conflict errors.
# Retrying upon 409s.
@backoff.on_exception(backoff.expo, Conflict, max_time=120)
def delete_bucket():
bucket.delete(force=True)

delete_bucket()


@pytest.mark.slow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
backoff==1.10.0
pytest==5.4.3
flaky==3.7.0
flaky==3.7.0

0 comments on commit 07cf916

Please sign in to comment.