Skip to content

Commit

Permalink
[translate] fix: mark some tests as flaky [(#3495)](GoogleCloudPlatfo…
Browse files Browse the repository at this point in the history
…rm/python-docs-samples#3495)

tests which involve LRO.

fixes #2875
  • Loading branch information
Takashi Matsuo authored and danoscarmike committed Jul 31, 2020
1 parent 426a4ce commit 10ba58f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def test_translate_text(capsys):
assert 'Translated Text:' in out


@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_batch_translate_text(capsys, bucket):
beta_snippets.batch_translate_text(
PROJECT_ID,
Expand Down Expand Up @@ -96,6 +97,7 @@ def test_list_languages_with_target(capsys):
assert u'Display Name: albanska' in out


@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_create_glossary(capsys, unique_glossary_id):
beta_snippets.create_glossary(PROJECT_ID, unique_glossary_id)
out, _ = capsys.readouterr()
Expand Down Expand Up @@ -125,6 +127,7 @@ def test_translate_text_with_glossary(capsys, glossary):
assert 'cuenta' in out


@pytest.mark.flaky(max_runs=3, min_passes=1)
def test_delete_glossary(capsys, unique_glossary_id):
beta_snippets.create_glossary(PROJECT_ID, unique_glossary_id)
beta_snippets.delete_glossary(PROJECT_ID, unique_glossary_id)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
flaky==3.6.1
pytest==5.3.2

0 comments on commit 10ba58f

Please sign in to comment.