Skip to content

Commit af8d9d4

Browse files
kweinmeisterAce Nassri
authored and
Ace Nassri
committed
test: Added retries to automlTablesPredict sample test (#561)
* Added retries to automlTablesPredict sample test * Convert arrow functions
1 parent 8d8390f commit af8d9d4

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

automl/test/automlTablesPredict.v1beta1.test.js

+17-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
'use strict';
1717

1818
const {assert} = require('chai');
19+
const {delay} = require('./util');
1920
const {describe, it} = require('mocha');
2021
const {execSync} = require('child_process');
2122

@@ -62,7 +63,10 @@ describe('Tables PredictionAPI', () => {
6263
});
6364

6465
it(`should perform batch prediction using GCS as source and
65-
GCS as destination`, async () => {
66+
GCS as destination`, async function () {
67+
this.retries(5);
68+
await delay(this.test);
69+
6670
// Run batch prediction using GCS as source and GCS as destination
6771
const output = exec(
6872
`node tables/predict-gcs-source-gcs-dest.v1beta1.js "${projectId}" "${region}" "${modelId}" "${gcsInputUri}" "${gcsOutputUriPrefix}"`
@@ -71,7 +75,10 @@ describe('Tables PredictionAPI', () => {
7175
});
7276

7377
it.skip(`should perform batch prediction using BQ as source and
74-
GCS as destination`, async () => {
78+
GCS as destination`, async function () {
79+
this.retries(5);
80+
await delay(this.test);
81+
7582
// Run batch prediction using BQ as source and GCS as destination
7683
const output = exec(
7784
`node tables/predict-gcs-source-bq-dest.v1beta1.js predict-using-bq-source-and-gcs-dest "${modelId}"` +
@@ -81,7 +88,10 @@ describe('Tables PredictionAPI', () => {
8188
});
8289

8390
it(`should perform batch prediction using GCS as source and
84-
BQ as destination`, async () => {
91+
BQ as destination`, async function () {
92+
this.retries(5);
93+
await delay(this.test);
94+
8595
// Run batch prediction using GCS as source and BQ as destination
8696
const output = exec(
8797
`node tables/predict-gcs-source-bq-dest.v1beta1.js "${projectId}" "${region}" "${modelId}" ` +
@@ -91,7 +101,10 @@ describe('Tables PredictionAPI', () => {
91101
});
92102

93103
it(`should perform batch prediction using BQ as source and
94-
BQ as destination`, async () => {
104+
BQ as destination`, async function () {
105+
this.retries(5);
106+
await delay(this.test);
107+
95108
// Run batch prediction using BQ as source and BQ as destination
96109
const output = exec(
97110
`node tables/predict-bq-source-bq-dest.v1beta1.js "${projectId}" "${region}" "${modelId}"` +

0 commit comments

Comments
 (0)