Skip to content

Commit

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

fixes GoogleCloudPlatform#2875
  • Loading branch information
Takashi Matsuo committed Apr 24, 2020
1 parent 517f099 commit 1150c6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions translate/cloud-client/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 translate/cloud-client/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 1150c6c

Please sign in to comment.