From 5e5b7443cea9e176febf05652e366e6213427eac Mon Sep 17 00:00:00 2001
From: Takashi Matsuo <tmatsuo@google.com>
Date: Thu, 7 May 2020 21:35:48 -0700
Subject: [PATCH] [vision] fix: mark a test as flaky (#3709)

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))