Skip to content

Commit 14f8b4e

Browse files
munkhuushmglAce Nassri
authored andcommitted
samples(tests): added retry logic to flaky batch tests (#587)
1 parent 340f6b0 commit 14f8b4e

4 files changed

+8
-4
lines changed

translate/test/v3/translate_batch_translate_text.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2525

2626
const REGION_TAG = 'translate_batch_translate_text';
2727

28-
describe(REGION_TAG, () => {
28+
describe(REGION_TAG, function () {
29+
this.retries(3);
2930
const translationClient = new TranslationServiceClient();
3031
const location = 'us-central1';
3132
const bucketUuid = uuid.v4();

translate/test/v3/translate_batch_translate_text_with_glossary.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2525

2626
const REGION_TAG = 'translate_batch_translate_text_with_glossary';
2727

28-
describe(REGION_TAG, () => {
28+
describe(REGION_TAG, function () {
29+
this.retries(3);
2930
const translationClient = new TranslationServiceClient();
3031
const location = 'us-central1';
3132
const glossaryId = `my_test_glossary_${uuid.v4()}`;

translate/test/v3/translate_batch_translate_text_with_glossary_and_model.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2525

2626
const REGION_TAG = 'translate_batch_translate_text_with_glossary_and_model';
2727

28-
describe(REGION_TAG, () => {
28+
describe(REGION_TAG, function () {
29+
this.retries(3);
2930
const translationClient = new TranslationServiceClient();
3031
const location = 'us-central1';
3132
const glossaryId = `my_test_glossary_${uuid.v4()}`;

translate/test/v3/translate_batch_translate_text_with_model.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2525

2626
const REGION_TAG = 'translate_batch_translate_text_with_model';
2727

28-
describe(REGION_TAG, () => {
28+
describe(REGION_TAG, function () {
29+
this.retries(3);
2930
const translationClient = new TranslationServiceClient();
3031
const location = 'us-central1';
3132
const modelId = 'TRL1218052175389786112';

0 commit comments

Comments
 (0)