From 5914eb774aa1a0203813a9d27cdb57fc0ab99320 Mon Sep 17 00:00:00 2001 From: Mike <45373284+munkhuushmgl@users.noreply.github.com> Date: Thu, 30 Jul 2020 09:25:03 -0700 Subject: [PATCH] samples: translate --> fixes timeout issue (#567) * samples: translate --> fixes timepoout issue * lint unhappy * added missing zero * added zero * fixed lint --- ...late_batch_translate_text_with_glossary_and_model.test.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/translate/test/v3/translate_batch_translate_text_with_glossary_and_model.test.js b/translate/test/v3/translate_batch_translate_text_with_glossary_and_model.test.js index fb4d19ee6ec..efd287fa981 100644 --- a/translate/test/v3/translate_batch_translate_text_with_glossary_and_model.test.js +++ b/translate/test/v3/translate_batch_translate_text_with_glossary_and_model.test.js @@ -72,7 +72,7 @@ describe(REGION_TAG, () => { await operation.promise(); }); - it('should batch translate the input text with a glossary', async () => { + it('should batch translate the input text with a glossary', async function () { const projectId = await translationClient.getProjectId(); const inputUri = 'gs://cloud-samples-data/translation/text_with_custom_model_and_glossary.txt'; @@ -83,6 +83,9 @@ describe(REGION_TAG, () => { ); assert.match(output, /Total Characters: 25/); assert.match(output, /Translated Characters: 25/); + + // batch translate fluctuates between 2 to 4 minutes. + this.timeout(300000); }); // Delete the folder from GCS for cleanup