Skip to content

Commit

Permalink
test: Added retries to automlTablesPredict sample test (#561)
Browse files Browse the repository at this point in the history
* Added retries to automlTablesPredict sample test

* Convert arrow functions
  • Loading branch information
kweinmeister authored and Ace Nassri committed Nov 17, 2022
1 parent 11cf01f commit b2f2600
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions automl/test/automlTablesPredict.v1beta1.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'use strict';

const {assert} = require('chai');
const {delay} = require('./util');
const {describe, it} = require('mocha');
const {execSync} = require('child_process');

Expand Down Expand Up @@ -62,7 +63,10 @@ describe('Tables PredictionAPI', () => {
});

it(`should perform batch prediction using GCS as source and
GCS as destination`, async () => {
GCS as destination`, async function () {
this.retries(5);
await delay(this.test);

// Run batch prediction using GCS as source and GCS as destination
const output = exec(
`node tables/predict-gcs-source-gcs-dest.v1beta1.js "${projectId}" "${region}" "${modelId}" "${gcsInputUri}" "${gcsOutputUriPrefix}"`
Expand All @@ -71,7 +75,10 @@ describe('Tables PredictionAPI', () => {
});

it.skip(`should perform batch prediction using BQ as source and
GCS as destination`, async () => {
GCS as destination`, async function () {
this.retries(5);
await delay(this.test);

// Run batch prediction using BQ as source and GCS as destination
const output = exec(
`node tables/predict-gcs-source-bq-dest.v1beta1.js predict-using-bq-source-and-gcs-dest "${modelId}"` +
Expand All @@ -81,7 +88,10 @@ describe('Tables PredictionAPI', () => {
});

it(`should perform batch prediction using GCS as source and
BQ as destination`, async () => {
BQ as destination`, async function () {
this.retries(5);
await delay(this.test);

// Run batch prediction using GCS as source and BQ as destination
const output = exec(
`node tables/predict-gcs-source-bq-dest.v1beta1.js "${projectId}" "${region}" "${modelId}" ` +
Expand All @@ -91,7 +101,10 @@ describe('Tables PredictionAPI', () => {
});

it(`should perform batch prediction using BQ as source and
BQ as destination`, async () => {
BQ as destination`, async function () {
this.retries(5);
await delay(this.test);

// Run batch prediction using BQ as source and BQ as destination
const output = exec(
`node tables/predict-bq-source-bq-dest.v1beta1.js "${projectId}" "${region}" "${modelId}"` +
Expand Down

0 comments on commit b2f2600

Please sign in to comment.