diff --git a/vision/cloud-client/detect/detect.py b/vision/cloud-client/detect/detect.py index a7d3eca8759b..a3976ffb7b32 100644 --- a/vision/cloud-client/detect/detect.py +++ b/vision/cloud-client/detect/detect.py @@ -836,7 +836,7 @@ def async_detect_document(gcs_source_uri, gcs_destination_uri): requests=[async_request]) print('Waiting for the operation to finish.') - operation.result(timeout=180) + operation.result(timeout=300) # Once the request has completed and the output has been # written to GCS, we can list all the output files. diff --git a/vision/cloud-client/detect/detect_test.py b/vision/cloud-client/detect/detect_test.py index 5a8774c12fbd..e577df758b7a 100644 --- a/vision/cloud-client/detect/detect_test.py +++ b/vision/cloud-client/detect/detect_test.py @@ -16,6 +16,7 @@ import uuid from google.cloud import storage +import pytest import detect @@ -208,6 +209,7 @@ def test_detect_crop_hints_uri(capsys): assert 'bounds: ' in out +@pytest.mark.flaky def test_async_detect_document(capsys): storage_client = storage.Client() bucket = storage_client.get_bucket(BUCKET) diff --git a/vision/cloud-client/detect/requirements-test.txt b/vision/cloud-client/detect/requirements-test.txt index 781d4326c947..1b569cb4f2c7 100644 --- a/vision/cloud-client/detect/requirements-test.txt +++ b/vision/cloud-client/detect/requirements-test.txt @@ -1 +1,2 @@ pytest==5.3.2 +flaky==3.6.1