From bbd4253539fa3cb0acf81b503ad32e9dfab57ec9 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Thu, 7 May 2020 22:45:02 +0000 Subject: [PATCH] [vision] fix: mark a test as flaky fixes #3702 --- vision/cloud-client/web/requirements-test.txt | 1 + vision/cloud-client/web/web_detect_test.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/vision/cloud-client/web/requirements-test.txt b/vision/cloud-client/web/requirements-test.txt index 781d4326c947..c6f9b64965ae 100644 --- a/vision/cloud-client/web/requirements-test.txt +++ b/vision/cloud-client/web/requirements-test.txt @@ -1 +1,2 @@ +flaky==3.6.1 pytest==5.3.2 diff --git a/vision/cloud-client/web/web_detect_test.py b/vision/cloud-client/web/web_detect_test.py index 8a2807367ee8..83f8c84f3cab 100644 --- a/vision/cloud-client/web/web_detect_test.py +++ b/vision/cloud-client/web/web_detect_test.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pytest + import web_detect ASSET_BUCKET = "cloud-samples-data" @@ -24,6 +26,7 @@ def test_detect_file(capsys): assert 'description' in out.lower() +@pytest.mark.flaky(max_runs=3, min_passes=1) def test_detect_web_gsuri(capsys): file_name = ('gs://{}/vision/landmark/pofa.jpg'.format( ASSET_BUCKET))