Skip to content

Commit

Permalink
tests: harden 'snippets_table.py' teardown against 429 (#106)
Browse files Browse the repository at this point in the history
Toward #87.
  • Loading branch information
tseaver committed Aug 10, 2020
1 parent 9b95765 commit e55b5a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/snippets_table.py
Expand Up @@ -33,6 +33,8 @@
import pytest

from test_utils.system import unique_resource_id
from test_utils.retry import RetryErrors
from google.api_core.exceptions import TooManyRequests
from google.cloud._helpers import UTC
from google.cloud.bigtable import Client
from google.cloud.bigtable import enums
Expand Down Expand Up @@ -64,6 +66,8 @@
CELL_VAL2 = b"cell-val2"
ROW_KEY2 = b"row_key_id2"

retry_429 = RetryErrors(TooManyRequests, max_tries=9)


class Config(object):
"""Run-time configuration to be modified at set-up.
Expand Down Expand Up @@ -102,7 +106,7 @@ def setup_module():


def teardown_module():
Config.INSTANCE.delete()
retry_429(Config.INSTANCE.delete)()


def test_bigtable_create_table():
Expand Down

0 comments on commit e55b5a6

Please sign in to comment.