Skip to content

Commit

Permalink
[translate] fix: mark some tests as flaky [(#3495)](#3495)
Browse files Browse the repository at this point in the history
tests which involve LRO.

fixes #2875
  • Loading branch information
Takashi Matsuo authored and dandhlee committed Nov 18, 2022
1 parent d993a56 commit 455da1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions translation/samples/snippets/beta_snippets_test.py
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
1 change: 1 addition & 0 deletions translation/samples/snippets/requirements-test.txt
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 455da1a

Please sign in to comment.