From 2a295abeebf4a2255769a0ab118269e95f170bde Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 9 Sep 2020 17:50:49 +0000 Subject: [PATCH] fix(sample): mark a test with flaky (#81) fixes #75 --- asset/snippets/snippets/quickstart_searchallresources_test.py | 1 + asset/snippets/snippets/requirements-test.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/snippets/quickstart_searchallresources_test.py index e594a72a3454..f27eeb3b39c1 100644 --- a/asset/snippets/snippets/quickstart_searchallresources_test.py +++ b/asset/snippets/snippets/quickstart_searchallresources_test.py @@ -46,6 +46,7 @@ def asset_dataset(bigquery_client): raise e +@pytest.mark.flaky(max_runs=3, min_passes=1) def test_search_all_resources(asset_dataset, capsys): scope = "projects/{}".format(PROJECT) query = "name:{}".format(DATASET) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 678aa129fb4f..bd6c79990493 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,2 +1,3 @@ backoff==1.10.0 +flaky==3.7.0 pytest==5.4.3