From df10b2390bb38a9156a9d2a87787a5e43a016ccc 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) fixes #4220 --- translate/cloud-client/beta_snippets.py | 2 +- .../cloud-client/translate_v3_batch_translate_text_test.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/translate/cloud-client/beta_snippets.py b/translate/cloud-client/beta_snippets.py index 08ee5b72fe60..96b19f5de7e5 100644 --- a/translate/cloud-client/beta_snippets.py +++ b/translate/cloud-client/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/translate/cloud-client/translate_v3_batch_translate_text_test.py b/translate/cloud-client/translate_v3_batch_translate_text_test.py index e7919d022938..f604a3e1ac07 100644 --- a/translate/cloud-client/translate_v3_batch_translate_text_test.py +++ b/translate/cloud-client/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