Skip to content

Commit

Permalink
test: run tests in parallel (GoogleCloudPlatform#3371)
Browse files Browse the repository at this point in the history
* test: run aiplatform tests in parallel

* update jobs parameter

* skip create custom job test

* skip test

* skip tests

* update all snippets

---------

Co-authored-by: Patti Shin <pattishin@users.noreply.github.com>
  • Loading branch information
kweinmeister and pattishin authored Aug 16, 2023
1 parent b579864 commit fa1ce04
Show file tree
Hide file tree
Showing 154 changed files with 173 additions and 173 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": "c8 mocha --timeout 2400000 test/*.js"
"test": "c8 mocha -p -j 2 --timeout 2400000 test/*.js"
},
"dependencies": {
"@google-cloud/aiplatform": "^2.3.0",
Expand Down
2 changes: 1 addition & 1 deletion ai-platform/snippets/test/create-custom-job.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function parseResponse(stdout) {

let customJobId;

describe('AI platform create custom job', async function () {
describe.skip('AI platform create custom job', async function () {
this.retries(2);
it('should create a new custom job', async () => {
const stdout = execSync(
Expand Down
2 changes: 1 addition & 1 deletion ai-platform/snippets/test/create-dataset-image.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const location = process.env.LOCATION;

let datasetId;

describe('AI platform create dataset image', () => {
describe.skip('AI platform create dataset image', () => {
it('should create a new image dataset in the parent resource', async () => {
const stdout = execSync(
`node ./create-dataset-image.js ${datasetDisplayName} ${project} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const location = process.env.LOCATION;

let datasetId;

describe('AI platform create dataset tabular bigquery', () => {
describe.skip('AI platform create dataset tabular bigquery', () => {
it('should create a new bigquery tabular dataset in the parent resource', async () => {
const stdout = execSync(
`node ./create-dataset-tabular-bigquery.js ${datasetDisplayName} \
Expand Down
2 changes: 1 addition & 1 deletion ai-platform/snippets/test/deploy-model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const location = process.env.LOCATION;
let deployedModelId;
let endpointId;

describe('AI platform deploy model', () => {
describe.skip('AI platform deploy model', () => {
it('should deploy the model in the specified endpoint', async () => {
const endOut =
execSync(`node ./create-endpoint.js ${endpointDisplayName} ${project} \
Expand Down
2 changes: 1 addition & 1 deletion appengine/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"start": "node app.js",
"system-test": "c8 mocha --exit test/*.test.js",
"system-test": "c8 mocha -p -j 2 --exit test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion appengine/building-an-app/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"start": "node server.js",
"deploy": "gcloud app deploy",
"test": "c8 mocha --exit test/*.test.js"
"test": "c8 mocha -p -j 2 --exit test/*.test.js"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion appengine/building-an-app/update/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"start": "node server.js",
"deploy": "gcloud app deploy",
"test": "c8 mocha test/*.test.js --exit --timeout=20000"
"test": "c8 mocha -p -j 2 test/*.test.js --exit --timeout=20000"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion appengine/datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"start": "node app.js",
"system-test": "c8 mocha --exit test/*.test.js",
"system-test": "c8 mocha -p -j 2 --exit test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion appengine/endpoints/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"deploy": "gcloud app deploy",
"start": "node app.js",
"unit-test": "c8 mocha test/ --timeout=60000 --exit",
"unit-test": "c8 mocha -p -j 2 test/ --timeout=60000 --exit",
"test": "npm run unit-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion appengine/hello-world/flexible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha --exit test/*.test.js"
"test": "c8 mocha -p -j 2 --exit test/*.test.js"
},
"dependencies": {
"express": "^4.17.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha --exit test/*.test.js"
"test": "c8 mocha -p -j 2 --exit test/*.test.js"
},
"dependencies": {
"express": "^4.17.1"
Expand Down
2 changes: 1 addition & 1 deletion appengine/hello-world/standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha --exit test/*.test.js"
"test": "c8 mocha -p -j 2 --exit test/*.test.js"
},
"dependencies": {
"express": "^4.17.1"
Expand Down
2 changes: 1 addition & 1 deletion appengine/memcached/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha --exit test/*.test.js"
"test": "c8 mocha -p -j 2 --exit test/*.test.js"
},
"dependencies": {
"express": "^4.16.4",
Expand Down
2 changes: 1 addition & 1 deletion appengine/metadata/flexible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": ">= 18.x.x"
},
"scripts": {
"system-test": "c8 mocha --exit test/*.test.js",
"system-test": "c8 mocha -p -j 2 --exit test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": "16.x.x"
},
"scripts": {
"system-test": "c8 mocha --exit test/*.test.js",
"system-test": "c8 mocha -p -j 2 --exit test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion appengine/metadata/standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": "16.x.x"
},
"scripts": {
"system-test": "c8 mocha --exit test/*.test.js",
"system-test": "c8 mocha -p -j 2 --exit test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion appengine/pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha test/*.test.js --timeout=30000 --exit"
"test": "c8 mocha -p -j 2 test/*.test.js --timeout=30000 --exit"
},
"dependencies": {
"@google-cloud/pubsub": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion appengine/static-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha --exit test/*.test.js --url localhost:8080/static/main.css"
"test": "c8 mocha -p -j 2 --exit test/*.test.js --url localhost:8080/static/main.css"
},
"dependencies": {
"express": "^4.16.4",
Expand Down
2 changes: 1 addition & 1 deletion appengine/storage/flexible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Node.js Google Cloud Storage sample for Google App Engine",
"scripts": {
"start": "node app.js",
"test": "c8 mocha system-test/*.test.js --exit --timeout=30000"
"test": "c8 mocha -p -j 2 system-test/*.test.js --exit --timeout=30000"
},
"engines": {
"node": ">=18.x.x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Node.js Google Cloud Storage sample for Google App Engine",
"scripts": {
"start": "node app.js",
"test": "c8 mocha system-test/*.test.js --exit --timeout=30000"
"test": "c8 mocha -p -j 2 system-test/*.test.js --exit --timeout=30000"
},
"engines": {
"node": "16.x.x"
Expand Down
2 changes: 1 addition & 1 deletion appengine/storage/standard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Node.js Google Cloud Storage sample for Google App Engine",
"scripts": {
"start": "node app.js",
"test": "c8 mocha system-test/*.test.js --exit --timeout=30000"
"test": "c8 mocha -p -j 2 system-test/*.test.js --exit --timeout=30000"
},
"engines": {
"node": ">=14.0.0"
Expand Down
2 changes: 1 addition & 1 deletion appengine/twilio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"start": "node app.js",
"test": "c8 mocha test/*.test.js"
"test": "c8 mocha -p -j 2 test/*.test.js"
},
"dependencies": {
"express": "^4.16.4",
Expand Down
2 changes: 1 addition & 1 deletion appengine/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"prepare": "npm run gcp-build",
"pretest": "npm run gcp-build",
"test": "c8 mocha test/*.test.js --exit",
"test": "c8 mocha -p -j 2 test/*.test.js --exit",
"lint": "gts lint",
"start": "node ./index.js",
"deploy": "gcloud app deploy",
Expand Down
2 changes: 1 addition & 1 deletion appengine/websockets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"scripts": {
"deploy": "gcloud app deploy",
"start": "node app.js",
"test": "c8 mocha --timeout 10000 --exit test/*.test.js",
"test": "c8 mocha -p -j 2 --timeout 10000 --exit test/*.test.js",
"e2e-test": "samples test deploy"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion asset/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"private": true,
"scripts": {
"lint": "gts lint",
"test": "c8 mocha test --timeout 600000"
"test": "c8 mocha -p -j 2 test --timeout 600000"
},
"dependencies": {
"@google-cloud/asset": "^5.0.0",
Expand Down
6 changes: 3 additions & 3 deletions auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"node": ">=12.0.0"
},
"scripts": {
"test:auth": "c8 mocha system-test/auth.test.js --timeout=30000",
"test:downscoping": "c8 mocha system-test/downscoping.test.js --timeout=30000",
"test:auth": "c8 mocha -p -j 2 system-test/auth.test.js --timeout=30000",
"test:downscoping": "c8 mocha -p -j 2 system-test/downscoping.test.js --timeout=30000",
"test": "npm -- run system-test",
"system-test": "c8 mocha system-test/*.test.js --timeout=30000"
"system-test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=30000"
},
"dependencies": {
"@google-cloud/storage": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion automl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": "googleapis/nodejs-automl",
"private": true,
"scripts": {
"test": "c8 mocha --timeout 9000000"
"test": "c8 mocha -p -j 2 --timeout 9000000"
},
"files": [
"**/*.js",
Expand Down
2 changes: 1 addition & 1 deletion batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"*.js"
],
"scripts": {
"test": "c8 mocha --timeout 600000 test/*.js",
"test": "c8 mocha -p -j 2 --timeout 600000 test/*.js",
"publish": "echo 'sample test; do not publish'"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion cloud-language/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"resources"
],
"scripts": {
"test": "c8 mocha --timeout 60000"
"test": "c8 mocha -p -j 2 --timeout 60000"
},
"dependencies": {
"@google-cloud/language": "^6.0.0",
Expand Down
4 changes: 2 additions & 2 deletions cloud-sql/mysql/mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha test/server.test.js --timeout=60000 --exit",
"system-test-unix": "c8 mocha test/server-unix.test.js --timeout=60000 --exit",
"system-test": "c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit",
"system-test-unix": "c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit",
"test": "npm run system-test && npm run system-test-unix"
},
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions cloud-sql/mysql/mysql2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha test/server.test.js --timeout=60000 --exit",
"system-test-tcp": "c8 mocha test/server-unix.test.js --timeout=60000 --exit",
"system-test-unix": "c8 mocha test/server-unix.test.js --timeout=60000 --exit",
"system-test": "c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit",
"system-test-tcp": "c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit",
"system-test-unix": "c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit",
"test": "npm run system-test && npm run system-test-tcp && npm run system-test-unix"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion cloud-sql/postgres/knex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"start": "node server/server.js",
"start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &",
"test": "c8 mocha test/*.test.js --timeout=60000 --exit"
"test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit"
},
"dependencies": {
"@google-cloud/cloud-sql-connector": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion cloud-sql/sqlserver/mssql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha test/*.test.js --timeout=60000 --exit",
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion cloud-sql/sqlserver/tedious/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha test/*.test.js --timeout=60000 --exit",
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion cloud-tasks/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"*.js"
],
"scripts": {
"test": "c8 mocha --timeout 30000",
"test": "c8 mocha -p -j 2 --timeout 30000",
"start": "node server.js"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion cloud-tasks/tutorial-gcf/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"start": "node index.js",
"test": "c8 mocha --timeout 10000"
"test": "c8 mocha -p -j 2 --timeout 10000"
},
"dependencies": {
"@google-cloud/tasks": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion cloud-tasks/tutorial-gcf/function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">=12.0.0"
},
"scripts": {
"test": "c8 mocha test/*.test.js --timeout=60000"
"test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000"
},
"dependencies": {
"@google-cloud/secret-manager": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=12.0.0"
},
"scripts": {
"test": "c8 mocha system-test --timeout=800000"
"test": "c8 mocha -p -j 2 system-test --timeout=800000"
},
"dependencies": {
"@google-cloud/cloudbuild": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": ">=12.0.0"
},
"scripts": {
"test": "c8 mocha --exit test/*.test.js"
"test": "c8 mocha -p -j 2 --exit test/*.test.js"
},
"devDependencies": {
"c8": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion compute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"*.js"
],
"scripts": {
"test": "c8 mocha test --timeout 1200000"
"test": "c8 mocha -p -j 2 test --timeout 1200000"
},
"dependencies": {
"@google-cloud/compute": "^3.5.1",
Expand Down
2 changes: 1 addition & 1 deletion contact-center-insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"*.js"
],
"scripts": {
"test": "c8 mocha --timeout 600000 test/*.js"
"test": "c8 mocha -p -j 2 --timeout 600000 test/*.js"
},
"dependencies": {
"@google-cloud/bigquery": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion container-analysis/snippets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"node": ">=12.0.0"
},
"scripts": {
"test": "c8 mocha --timeout 100000 test/**.test.js"
"test": "c8 mocha -p -j 2 --timeout 100000 test/**.test.js"
},
"dependencies": {
"@google-cloud/containeranalysis": "^4.4.1",
Expand Down
Loading

0 comments on commit fa1ce04

Please sign in to comment.