From 1352496f8b76e34e85d5ad66befa42d972c32ed2 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Thu, 16 Jul 2020 14:47:47 -0700 Subject: [PATCH] testing(translate): bump the timeout for operations [(#4258)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4258) fixes #4220 --- samples/snippets/beta_snippets.py | 2 +- samples/snippets/translate_v3_batch_translate_text_test.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/snippets/beta_snippets.py b/samples/snippets/beta_snippets.py index 08ee5b72..96b19f5d 100644 --- a/samples/snippets/beta_snippets.py +++ b/samples/snippets/beta_snippets.py @@ -70,7 +70,7 @@ def batch_translate_text(project_id, input_uri, output_uri): input_configs=[input_config], output_config=output_config) - result = operation.result(180) + result = operation.result(timeout=240) print(u'Total Characters: {}'.format(result.total_characters)) print(u'Translated Characters: {}'.format(result.translated_characters)) diff --git a/samples/snippets/translate_v3_batch_translate_text_test.py b/samples/snippets/translate_v3_batch_translate_text_test.py index e7919d02..f604a3e1 100644 --- a/samples/snippets/translate_v3_batch_translate_text_test.py +++ b/samples/snippets/translate_v3_batch_translate_text_test.py @@ -42,6 +42,7 @@ def test_batch_translate_text(capsys, bucket): "gs://cloud-samples-data/translation/text.txt", "gs://{}/translation/BATCH_TRANSLATION_OUTPUT/".format(bucket.name), PROJECT_ID, + timeout=240 ) out, _ = capsys.readouterr() assert "Total Characters" in out