diff --git a/vision/cloud-client/detect/vision_async_batch_annotate_images.py b/vision/cloud-client/detect/vision_async_batch_annotate_images.py index c02958883309..5a9bd8fd5a0f 100644 --- a/vision/cloud-client/detect/vision_async_batch_annotate_images.py +++ b/vision/cloud-client/detect/vision_async_batch_annotate_images.py @@ -46,7 +46,7 @@ def sample_async_batch_annotate_images( operation = client.async_batch_annotate_images(requests, output_config) print("Waiting for operation to complete...") - response = operation.result() + response = operation.result(90) # The output is written to GCS with the provided output_uri as prefix gcs_output_uri = response.output_config.gcs_destination.uri diff --git a/vision/cloud-client/detect/vision_async_batch_annotate_images_test.py b/vision/cloud-client/detect/vision_async_batch_annotate_images_test.py index 003a6fa894cb..f025d6624e86 100644 --- a/vision/cloud-client/detect/vision_async_batch_annotate_images_test.py +++ b/vision/cloud-client/detect/vision_async_batch_annotate_images_test.py @@ -49,6 +49,7 @@ def bucket(storage_client): blob.delete() +@pytest.mark.flaky(max_runs=3, min_passes=1) def test_sample_asyn_batch_annotate_images(storage_client, bucket, capsys): input_image_uri = os.path.join(GCS_ROOT, "label/wakeupcat.jpg")