Skip to content

Commit

Permalink
build: increase retries and timeout for flaky tests (#60)
Browse files Browse the repository at this point in the history
* build: increase retries and timeout for flaky tests
  • Loading branch information
sofisl authored and pattishin committed Nov 22, 2022
1 parent 4014d50 commit d6c24b6
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ai-platform/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"*.js"
],
"scripts": {
"test": "mocha --timeout 600000 test/*.js"
"test": "mocha --timeout 800000 test/*.js"
},
"dependencies": {
"@google-cloud/aiplatform": "^1.3.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline image classification', () => {
describe('AI platform create training pipeline image classification', async function () {
this.retries(2);
it('should create a new image classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-image-classification.js ${datasetId} ${modelDisplayName} ${trainingPipelineDisplayName} ${project} ${location}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline image object detection', () => {
describe('AI platform create training pipeline image object detection', async function () {
this.retries(2);
it('should create a new image object detection training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-image-object-detection.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline tables classification', () => {
describe('AI platform create training pipeline tables classification', async function () {
this.retries(2);
it('should create a new tables classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-tabular-classification.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline tabular regression', () => {
describe('AI platform create training pipeline tabular regression', async function () {
this.retries(2);
it('should create a new tabular regression training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-tabular-regression.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline text classification', () => {
describe('AI platform create training pipeline text classification', async function () {
this.retries(2);
it('should create a new text classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-text-classification.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline text entity extraction', () => {
describe('AI platform create training pipeline text entity extraction', async function () {
this.retries(2);
it('should create a new text entity extraction training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-text-entity-extraction.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline text sentiment analysis', () => {
describe('AI platform create training pipeline text sentiment analysis', async function () {
this.retries(2);
it('should create a new text sentiment analysis training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-text-sentiment-analysis.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline video classification', () => {
describe('AI platform create training pipeline video classification', async function () {
this.retries(2);
it('should create a new video classification training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-video-classification.js ${datasetId} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ const project = process.env.CAIP_PROJECT_ID;

let trainingPipelineId;

describe('AI platform create training pipeline object tracking', () => {
describe('AI platform create training pipeline object tracking', async function () {
this.retries(2);
it('should create a new object tracking training pipeline', async () => {
const stdout = execSync(
`node ./create-training-pipeline-video-object-tracking.js \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const endpointId = '2791387344039575552';
const project = process.env.CAIP_PROJECT_ID;
const location = 'us-central1';

describe('AI platform predict image object detection', () => {
describe('AI platform predict image object detection', async function () {
this.retries(2);
it('should make predictions using the image object detection model', async () => {
const stdout = execSync(
`node ./predict-image-object-detection.js ${filename} \
Expand Down

0 comments on commit d6c24b6

Please sign in to comment.