Skip to content

Commit

Permalink
testing: mark some tests as flaky (#3288)
Browse files Browse the repository at this point in the history
fixes #3138
  • Loading branch information
Takashi Matsuo authored Apr 7, 2020
1 parent efe5e78 commit aea928b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datalabeling/manage_dataset_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def dataset():
manage_dataset.delete_dataset(dataset.name)


@pytest.mark.flaky(max_runs=3)
def test_create_dataset(capsys):
response = manage_dataset.create_dataset(PROJECT_ID)
out, _ = capsys.readouterr()
Expand All @@ -42,18 +43,21 @@ def test_create_dataset(capsys):
manage_dataset.delete_dataset(response.name)


@pytest.mark.flaky(max_runs=3)
def test_list_dataset(capsys, dataset):
manage_dataset.list_datasets(PROJECT_ID)
out, _ = capsys.readouterr()
assert dataset.name in out


@pytest.mark.flaky(max_runs=3)
def test_get_dataset(capsys, dataset):
manage_dataset.get_dataset(dataset.name)
out, _ = capsys.readouterr()
assert "The dataset resource name:" in out


@pytest.mark.flaky(max_runs=3)
def test_delete_dataset(capsys):
# Creates a dataset.
response = manage_dataset.create_dataset(PROJECT_ID)
Expand Down
1 change: 1 addition & 0 deletions datalabeling/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pytest==5.3.2
flaky==3.6.1

0 comments on commit aea928b

Please sign in to comment.