From fa1ce04eed4ded19fb37b3464a209876ff49e6b0 Mon Sep 17 00:00:00 2001 From: Karl Weinmeister <11586922+kweinmeister@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:18:21 -0500 Subject: [PATCH] test: run tests in parallel (#3371) * 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 --- ai-platform/snippets/package.json | 2 +- ai-platform/snippets/test/create-custom-job.test.js | 2 +- ai-platform/snippets/test/create-dataset-image.test.js | 2 +- .../snippets/test/create-dataset-tabular-bigquery.test.js | 2 +- ai-platform/snippets/test/deploy-model.test.js | 2 +- appengine/analytics/package.json | 2 +- appengine/building-an-app/build/package.json | 2 +- appengine/building-an-app/update/package.json | 2 +- appengine/datastore/package.json | 2 +- appengine/endpoints/package.json | 2 +- appengine/hello-world/flexible/package.json | 2 +- .../hello-world/flexible_nodejs16_and_earlier/package.json | 2 +- appengine/hello-world/standard/package.json | 2 +- appengine/memcached/package.json | 2 +- appengine/metadata/flexible/package.json | 2 +- .../metadata/flexible_nodejs16_and_earlier/package.json | 2 +- appengine/metadata/standard/package.json | 2 +- appengine/pubsub/package.json | 2 +- appengine/static-files/package.json | 2 +- appengine/storage/flexible/package.json | 2 +- .../storage/flexible_nodejs16_and_earlier/package.json | 2 +- appengine/storage/standard/package.json | 2 +- appengine/twilio/package.json | 2 +- appengine/typescript/package.json | 2 +- appengine/websockets/package.json | 2 +- asset/snippets/package.json | 2 +- auth/package.json | 6 +++--- automl/package.json | 2 +- batch/package.json | 2 +- cloud-language/package.json | 2 +- cloud-sql/mysql/mysql/package.json | 4 ++-- cloud-sql/mysql/mysql2/package.json | 6 +++--- cloud-sql/postgres/knex/package.json | 2 +- cloud-sql/sqlserver/mssql/package.json | 2 +- cloud-sql/sqlserver/tedious/package.json | 2 +- cloud-tasks/snippets/package.json | 2 +- cloud-tasks/tutorial-gcf/app/package.json | 2 +- cloud-tasks/tutorial-gcf/function/package.json | 2 +- cloudbuild/package.json | 2 +- composer/package.json | 2 +- compute/package.json | 2 +- contact-center-insights/package.json | 2 +- container-analysis/snippets/package.json | 2 +- container/package.json | 2 +- datacatalog/cloud-client/package.json | 2 +- datacatalog/quickstart/package.json | 2 +- datacatalog/snippets/package.json | 2 +- datalabeling/package.json | 2 +- dataproc/package.json | 2 +- datastore/functions/package.json | 2 +- dialogflow-cx/package.json | 2 +- dialogflow/package.json | 2 +- dlp/package.json | 2 +- document-ai/package.json | 2 +- document-warehouse/package.json | 2 +- endpoints/getting-started/package.json | 2 +- error-reporting/package.json | 2 +- eventarc/audit-storage/package.json | 2 +- eventarc/generic/package.json | 2 +- eventarc/pubsub/package.json | 2 +- functions/billing/package.json | 4 ++-- functions/env_vars/package.json | 2 +- functions/firebase/helloAnalytics/package.json | 2 +- functions/firebase/helloAuth/package.json | 2 +- functions/firebase/helloFirestore/package.json | 2 +- functions/firebase/helloRTDB/package.json | 2 +- functions/firebase/helloRemoteConfig/package.json | 2 +- functions/firebase/makeUpperCase/package.json | 2 +- functions/helloworld/helloError/package.json | 2 +- functions/helloworld/helloGCS/package.json | 4 ++-- functions/helloworld/helloPubSub/package.json | 4 ++-- functions/helloworld/helloworldGet/package.json | 2 +- functions/helloworld/helloworldHttp/package.json | 4 ++-- functions/http/corsEnabledFunction/package.json | 2 +- functions/http/corsEnabledFunctionAuth/package.json | 2 +- functions/http/httpContent/package.json | 2 +- functions/http/httpMethods/package.json | 2 +- functions/http/parseXML/package.json | 2 +- functions/imagemagick/package.json | 2 +- functions/log/helloWorld/package.json | 2 +- functions/log/processEntry/package.json | 2 +- functions/memorystore/redis/package.json | 2 +- functions/ocr/app/package.json | 2 +- functions/pubsub/publish/package.json | 2 +- functions/pubsub/subscribe/package.json | 2 +- functions/scheduleinstance/package.json | 2 +- functions/security/package.json | 2 +- functions/slack/package.json | 2 +- functions/spanner/package.json | 2 +- functions/speech-to-speech/functions/package.json | 2 +- functions/tips/gcpApiCall/package.json | 2 +- functions/tips/retry/package.json | 2 +- functions/tips/scopeDemo/package.json | 2 +- functions/v2/autoLabelInstance/package.json | 4 ++-- functions/v2/cloudEventLogging/package.json | 2 +- functions/v2/firebase/firestore/helloFirestore/package.json | 2 +- functions/v2/firebase/firestore/makeUpperCase/package.json | 2 +- .../firebase/remote-config/helloRemoteConfig/package.json | 2 +- functions/v2/firebase/rtdb/helloRTDB/package.json | 2 +- functions/v2/helloAuditLog/package.json | 2 +- functions/v2/helloBigQuery/package.json | 2 +- functions/v2/helloGCS/package.json | 2 +- functions/v2/helloPubSub/package.json | 2 +- functions/v2/httpLogging/package.json | 2 +- functions/v2/imagemagick/package.json | 2 +- functions/v2/log/processEntry/package.json | 2 +- functions/v2/ocr/app/package.json | 2 +- functions/v2/responseStreaming/package.json | 2 +- functions/v2/tips/avoidInfiniteRetries/package.json | 2 +- functions/v2/tips/retry/package.json | 2 +- functions/v2/typed/googlechatbot/package.json | 2 +- functions/v2/typed/greeting/package.json | 2 +- game-servers/snippets/package.json | 2 +- healthcare/consent/package.json | 2 +- healthcare/datasets/package.json | 2 +- healthcare/dicom/package.json | 2 +- healthcare/fhir/package.json | 2 +- healthcare/hl7v2/package.json | 2 +- iam/deny/package.json | 2 +- kms/package.json | 2 +- media/livestream/package.json | 2 +- media/transcoder/package.json | 2 +- media/video-stitcher/package.json | 2 +- mediatranslation/package.json | 2 +- monitoring/opencensus/package.json | 2 +- monitoring/snippets/package.json | 2 +- opencensus/package.json | 2 +- recaptcha_enterprise/snippets/package.json | 2 +- retail/package.json | 2 +- run/filesystem/package.json | 4 ++-- run/hello-broken/package.json | 2 +- run/helloworld/package.json | 4 ++-- run/idp-sql/package.json | 4 ++-- run/image-processing/package.json | 4 ++-- run/jobs/package.json | 4 ++-- run/logging-manual/package.json | 2 +- run/markdown-preview/editor/package.json | 4 ++-- run/markdown-preview/renderer/package.json | 4 ++-- run/pubsub/package.json | 4 ++-- run/system-package/package.json | 4 ++-- run/websockets/package.json | 2 +- scheduler/package.json | 2 +- secret-manager/package.json | 2 +- security-center/snippets/package.json | 2 +- service-directory/snippets/package.json | 2 +- speech/package.json | 2 +- storagetransfer/package.json | 2 +- talent/package.json | 2 +- texttospeech/package.json | 2 +- translate/package.json | 2 +- video-intelligence/package.json | 2 +- vision/package.json | 2 +- workflows/invoke-private-endpoint/package.json | 2 +- workflows/package.json | 2 +- 154 files changed, 173 insertions(+), 173 deletions(-) diff --git a/ai-platform/snippets/package.json b/ai-platform/snippets/package.json index e8ebfbf220..698d9adc91 100644 --- a/ai-platform/snippets/package.json +++ b/ai-platform/snippets/package.json @@ -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", diff --git a/ai-platform/snippets/test/create-custom-job.test.js b/ai-platform/snippets/test/create-custom-job.test.js index ac87d2e9bd..f97fb739c6 100644 --- a/ai-platform/snippets/test/create-custom-job.test.js +++ b/ai-platform/snippets/test/create-custom-job.test.js @@ -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( diff --git a/ai-platform/snippets/test/create-dataset-image.test.js b/ai-platform/snippets/test/create-dataset-image.test.js index bd9ea481b7..7bec9e5f38 100644 --- a/ai-platform/snippets/test/create-dataset-image.test.js +++ b/ai-platform/snippets/test/create-dataset-image.test.js @@ -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} \ diff --git a/ai-platform/snippets/test/create-dataset-tabular-bigquery.test.js b/ai-platform/snippets/test/create-dataset-tabular-bigquery.test.js index 829da9dd43..1bb7ac6408 100644 --- a/ai-platform/snippets/test/create-dataset-tabular-bigquery.test.js +++ b/ai-platform/snippets/test/create-dataset-tabular-bigquery.test.js @@ -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} \ diff --git a/ai-platform/snippets/test/deploy-model.test.js b/ai-platform/snippets/test/deploy-model.test.js index dcd84b9184..aa3ceb197c 100644 --- a/ai-platform/snippets/test/deploy-model.test.js +++ b/ai-platform/snippets/test/deploy-model.test.js @@ -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} \ diff --git a/appengine/analytics/package.json b/appengine/analytics/package.json index ede1fa1e36..6fa1da9de6 100644 --- a/appengine/analytics/package.json +++ b/appengine/analytics/package.json @@ -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": { diff --git a/appengine/building-an-app/build/package.json b/appengine/building-an-app/build/package.json index d92fcb492c..1261d91729 100644 --- a/appengine/building-an-app/build/package.json +++ b/appengine/building-an-app/build/package.json @@ -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", diff --git a/appengine/building-an-app/update/package.json b/appengine/building-an-app/update/package.json index 2284c387ea..10bd9d7a3e 100644 --- a/appengine/building-an-app/update/package.json +++ b/appengine/building-an-app/update/package.json @@ -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", diff --git a/appengine/datastore/package.json b/appengine/datastore/package.json index 70c16f06e2..ec691b3e3d 100644 --- a/appengine/datastore/package.json +++ b/appengine/datastore/package.json @@ -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": { diff --git a/appengine/endpoints/package.json b/appengine/endpoints/package.json index 3bb42a1ddb..fb3cf69f69 100644 --- a/appengine/endpoints/package.json +++ b/appengine/endpoints/package.json @@ -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": { diff --git a/appengine/hello-world/flexible/package.json b/appengine/hello-world/flexible/package.json index 4b4775f3b5..8686bdfc30 100644 --- a/appengine/hello-world/flexible/package.json +++ b/appengine/hello-world/flexible/package.json @@ -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" diff --git a/appengine/hello-world/flexible_nodejs16_and_earlier/package.json b/appengine/hello-world/flexible_nodejs16_and_earlier/package.json index 3327046976..ad9e77f4e5 100644 --- a/appengine/hello-world/flexible_nodejs16_and_earlier/package.json +++ b/appengine/hello-world/flexible_nodejs16_and_earlier/package.json @@ -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" diff --git a/appengine/hello-world/standard/package.json b/appengine/hello-world/standard/package.json index 33b5bf0d8c..144d4584b8 100644 --- a/appengine/hello-world/standard/package.json +++ b/appengine/hello-world/standard/package.json @@ -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" diff --git a/appengine/memcached/package.json b/appengine/memcached/package.json index 6c6f5a30f8..7ec251edc2 100644 --- a/appengine/memcached/package.json +++ b/appengine/memcached/package.json @@ -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", diff --git a/appengine/metadata/flexible/package.json b/appengine/metadata/flexible/package.json index 77089b6063..1de8c57819 100644 --- a/appengine/metadata/flexible/package.json +++ b/appengine/metadata/flexible/package.json @@ -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": { diff --git a/appengine/metadata/flexible_nodejs16_and_earlier/package.json b/appengine/metadata/flexible_nodejs16_and_earlier/package.json index 39b20510e4..ea7ce8d0e5 100644 --- a/appengine/metadata/flexible_nodejs16_and_earlier/package.json +++ b/appengine/metadata/flexible_nodejs16_and_earlier/package.json @@ -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": { diff --git a/appengine/metadata/standard/package.json b/appengine/metadata/standard/package.json index 2ab1b53927..18b00257f0 100644 --- a/appengine/metadata/standard/package.json +++ b/appengine/metadata/standard/package.json @@ -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": { diff --git a/appengine/pubsub/package.json b/appengine/pubsub/package.json index ba86d0cd2a..9b9f7e9a46 100644 --- a/appengine/pubsub/package.json +++ b/appengine/pubsub/package.json @@ -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", diff --git a/appengine/static-files/package.json b/appengine/static-files/package.json index cd390fad5d..23acdf63a6 100644 --- a/appengine/static-files/package.json +++ b/appengine/static-files/package.json @@ -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", diff --git a/appengine/storage/flexible/package.json b/appengine/storage/flexible/package.json index 2292a81d97..1cf82e609b 100644 --- a/appengine/storage/flexible/package.json +++ b/appengine/storage/flexible/package.json @@ -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" diff --git a/appengine/storage/flexible_nodejs16_and_earlier/package.json b/appengine/storage/flexible_nodejs16_and_earlier/package.json index 34746aca2f..4b8b4f3f8d 100644 --- a/appengine/storage/flexible_nodejs16_and_earlier/package.json +++ b/appengine/storage/flexible_nodejs16_and_earlier/package.json @@ -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" diff --git a/appengine/storage/standard/package.json b/appengine/storage/standard/package.json index 7391a95cf3..eb6ecea3ad 100644 --- a/appengine/storage/standard/package.json +++ b/appengine/storage/standard/package.json @@ -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" diff --git a/appengine/twilio/package.json b/appengine/twilio/package.json index a4698a46ff..ea6f5b3711 100644 --- a/appengine/twilio/package.json +++ b/appengine/twilio/package.json @@ -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", diff --git a/appengine/typescript/package.json b/appengine/typescript/package.json index a7d8b1e66b..a460ea73ee 100644 --- a/appengine/typescript/package.json +++ b/appengine/typescript/package.json @@ -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", diff --git a/appengine/websockets/package.json b/appengine/websockets/package.json index 605b64272e..d5410e8882 100644 --- a/appengine/websockets/package.json +++ b/appengine/websockets/package.json @@ -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": { diff --git a/asset/snippets/package.json b/asset/snippets/package.json index 83202c9d8d..45099ade79 100644 --- a/asset/snippets/package.json +++ b/asset/snippets/package.json @@ -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", diff --git a/auth/package.json b/auth/package.json index 9dd8b250c0..436f47aad7 100644 --- a/auth/package.json +++ b/auth/package.json @@ -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", diff --git a/automl/package.json b/automl/package.json index a39854bb9f..1959d90257 100644 --- a/automl/package.json +++ b/automl/package.json @@ -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", diff --git a/batch/package.json b/batch/package.json index 54585568d3..594a79bf41 100644 --- a/batch/package.json +++ b/batch/package.json @@ -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": { diff --git a/cloud-language/package.json b/cloud-language/package.json index 80f981b2bd..a227d82168 100644 --- a/cloud-language/package.json +++ b/cloud-language/package.json @@ -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", diff --git a/cloud-sql/mysql/mysql/package.json b/cloud-sql/mysql/mysql/package.json index 178c65d50b..a478000510 100644 --- a/cloud-sql/mysql/mysql/package.json +++ b/cloud-sql/mysql/mysql/package.json @@ -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": { diff --git a/cloud-sql/mysql/mysql2/package.json b/cloud-sql/mysql/mysql2/package.json index 41fcbcb870..46f6107752 100644 --- a/cloud-sql/mysql/mysql2/package.json +++ b/cloud-sql/mysql/mysql2/package.json @@ -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": { diff --git a/cloud-sql/postgres/knex/package.json b/cloud-sql/postgres/knex/package.json index 5201a84c29..0e094dca27 100644 --- a/cloud-sql/postgres/knex/package.json +++ b/cloud-sql/postgres/knex/package.json @@ -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", diff --git a/cloud-sql/sqlserver/mssql/package.json b/cloud-sql/sqlserver/mssql/package.json index fe940ba7f9..30f89a25f3 100644 --- a/cloud-sql/sqlserver/mssql/package.json +++ b/cloud-sql/sqlserver/mssql/package.json @@ -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": { diff --git a/cloud-sql/sqlserver/tedious/package.json b/cloud-sql/sqlserver/tedious/package.json index 7a461e5dd4..2ff663b7f1 100644 --- a/cloud-sql/sqlserver/tedious/package.json +++ b/cloud-sql/sqlserver/tedious/package.json @@ -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": { diff --git a/cloud-tasks/snippets/package.json b/cloud-tasks/snippets/package.json index d403844505..5a8b0a51b2 100644 --- a/cloud-tasks/snippets/package.json +++ b/cloud-tasks/snippets/package.json @@ -11,7 +11,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha --timeout 30000", + "test": "c8 mocha -p -j 2 --timeout 30000", "start": "node server.js" }, "dependencies": { diff --git a/cloud-tasks/tutorial-gcf/app/package.json b/cloud-tasks/tutorial-gcf/app/package.json index 0bb8fb6eb5..a35f157639 100644 --- a/cloud-tasks/tutorial-gcf/app/package.json +++ b/cloud-tasks/tutorial-gcf/app/package.json @@ -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", diff --git a/cloud-tasks/tutorial-gcf/function/package.json b/cloud-tasks/tutorial-gcf/function/package.json index 6937a0eaed..6ab2c4931e 100644 --- a/cloud-tasks/tutorial-gcf/function/package.json +++ b/cloud-tasks/tutorial-gcf/function/package.json @@ -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", diff --git a/cloudbuild/package.json b/cloudbuild/package.json index 9d88499553..7d3e0c63f7 100644 --- a/cloudbuild/package.json +++ b/cloudbuild/package.json @@ -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" diff --git a/composer/package.json b/composer/package.json index 99521b57c2..6549bd8a76 100644 --- a/composer/package.json +++ b/composer/package.json @@ -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", diff --git a/compute/package.json b/compute/package.json index c7f215bf14..86c51d2fc4 100644 --- a/compute/package.json +++ b/compute/package.json @@ -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", diff --git a/contact-center-insights/package.json b/contact-center-insights/package.json index 9b770c9664..3606a2f8fd 100644 --- a/contact-center-insights/package.json +++ b/contact-center-insights/package.json @@ -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", diff --git a/container-analysis/snippets/package.json b/container-analysis/snippets/package.json index 7878872d0a..9ec28f8e2c 100644 --- a/container-analysis/snippets/package.json +++ b/container-analysis/snippets/package.json @@ -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", diff --git a/container/package.json b/container/package.json index b19c9d0960..b26541c71b 100644 --- a/container/package.json +++ b/container/package.json @@ -11,7 +11,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha system-test --timeout 1000000" + "test": "c8 mocha -p -j 2 system-test --timeout 1000000" }, "dependencies": { "@google-cloud/container": "^5.0.0" diff --git a/datacatalog/cloud-client/package.json b/datacatalog/cloud-client/package.json index ba4e4209a1..2768be6947 100644 --- a/datacatalog/cloud-client/package.json +++ b/datacatalog/cloud-client/package.json @@ -10,7 +10,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/datacatalog/quickstart/package.json b/datacatalog/quickstart/package.json index edea9b486a..8e969e6f48 100644 --- a/datacatalog/quickstart/package.json +++ b/datacatalog/quickstart/package.json @@ -10,7 +10,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/datacatalog/snippets/package.json b/datacatalog/snippets/package.json index 071fa3fcde..2f3b84081c 100644 --- a/datacatalog/snippets/package.json +++ b/datacatalog/snippets/package.json @@ -12,7 +12,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha --timeout 600000" + "test": "c8 mocha -p -j 2 --timeout 600000" }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", diff --git a/datalabeling/package.json b/datalabeling/package.json index a23e740812..1006c596fa 100644 --- a/datalabeling/package.json +++ b/datalabeling/package.json @@ -11,7 +11,7 @@ "!test/" ], "scripts": { - "test": "c8 mocha --timeout 600000" + "test": "c8 mocha -p -j 2 --timeout 600000" }, "dependencies": { "@google-cloud/datalabeling": "^4.0.0" diff --git a/dataproc/package.json b/dataproc/package.json index 7727314898..4952718d55 100644 --- a/dataproc/package.json +++ b/dataproc/package.json @@ -11,7 +11,7 @@ "repository": "googleapis/nodejs-dataproc", "private": true, "scripts": { - "test": "c8 mocha system-test --timeout 600000" + "test": "c8 mocha -p -j 2 system-test --timeout 600000" }, "dependencies": { "@google-cloud/dataproc": "^5.0.0", diff --git a/datastore/functions/package.json b/datastore/functions/package.json index 15a91cd385..f66089abcd 100644 --- a/datastore/functions/package.json +++ b/datastore/functions/package.json @@ -11,7 +11,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=5000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=5000" }, "dependencies": { "@google-cloud/datastore": "^8.0.0" diff --git a/dialogflow-cx/package.json b/dialogflow-cx/package.json index f5e4b69200..8a8dec8ffa 100644 --- a/dialogflow-cx/package.json +++ b/dialogflow-cx/package.json @@ -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/dialogflow-cx": "^4.0.0", diff --git a/dialogflow/package.json b/dialogflow/package.json index 58b14681ba..61b3e9b577 100644 --- a/dialogflow/package.json +++ b/dialogflow/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test --timeout=600000" + "test": "c8 mocha -p -j 2 system-test --timeout=600000" }, "dependencies": { "@google-cloud/dialogflow": "^6.0.0", diff --git a/dlp/package.json b/dlp/package.json index 1cea142e04..909cc24d97 100644 --- a/dlp/package.json +++ b/dlp/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=600000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=600000" }, "dependencies": { "@google-cloud/dlp": "^5.0.0", diff --git a/document-ai/package.json b/document-ai/package.json index f8aff7f12b..279bbb07a7 100644 --- a/document-ai/package.json +++ b/document-ai/package.json @@ -10,7 +10,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha test/*.js --timeout 600000" + "test": "c8 mocha -p -j 2 test/*.js --timeout 600000" }, "dependencies": { "@google-cloud/documentai": "^8.0.0", diff --git a/document-warehouse/package.json b/document-warehouse/package.json index 9817f1801c..36f78d41a1 100644 --- a/document-warehouse/package.json +++ b/document-warehouse/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "scripts": { - "test": "c8 mocha test/*.js --timeout 600000" + "test": "c8 mocha -p -j 2 test/*.js --timeout 600000" }, "dependencies": { "@google-cloud/contentwarehouse": "^1.0.0" diff --git a/endpoints/getting-started/package.json b/endpoints/getting-started/package.json index 047328645a..ab7236588a 100644 --- a/endpoints/getting-started/package.json +++ b/endpoints/getting-started/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node app.js", - "test": "c8 mocha -- test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 -- test/*.test.js --timeout=20000" }, "dependencies": { "express": "^4.16.4" diff --git a/error-reporting/package.json b/error-reporting/package.json index f1d5e96eb5..32c963285d 100644 --- a/error-reporting/package.json +++ b/error-reporting/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha --timeout=600000" + "test": "c8 mocha -p -j 2 --timeout=600000" }, "dependencies": { "@google-cloud/error-reporting": "^3.0.4", diff --git a/eventarc/audit-storage/package.json b/eventarc/audit-storage/package.json index 15b469dddd..19b07071d2 100644 --- a/eventarc/audit-storage/package.json +++ b/eventarc/audit-storage/package.json @@ -15,7 +15,7 @@ }, "scripts": { "start": "node index.js", - "unit-test": "c8 mocha test/app.test.js --check-leaks", + "unit-test": "c8 mocha -p -j 2 test/app.test.js --check-leaks", "system-test": "test/runner.sh mocha test/system.test.js --timeout=11000", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" diff --git a/eventarc/generic/package.json b/eventarc/generic/package.json index 169f217a32..cd9040c8b4 100644 --- a/eventarc/generic/package.json +++ b/eventarc/generic/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --check-leaks", + "test": "c8 mocha -p -j 2 test/app.test.js --check-leaks", "system-test": "test/runner.sh mocha test/system.test.js --timeout=10000" }, "dependencies": { diff --git a/eventarc/pubsub/package.json b/eventarc/pubsub/package.json index b1fae899b4..648ffd1cb4 100644 --- a/eventarc/pubsub/package.json +++ b/eventarc/pubsub/package.json @@ -15,7 +15,7 @@ }, "scripts": { "start": "node index.js", - "unit-test": "c8 mocha test/app.test.js --check-leaks", + "unit-test": "c8 mocha -p -j 2 test/app.test.js --check-leaks", "system-test": "test/runner.sh mocha test/system.test.js --timeout=10000", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run all-test" diff --git a/functions/billing/package.json b/functions/billing/package.json index b4172d0350..d015d0436c 100644 --- a/functions/billing/package.json +++ b/functions/billing/package.json @@ -8,8 +8,8 @@ "node": ">=12.0.0" }, "scripts": { - "compute-test": "c8 mocha test/periodic.test.js --timeout=600000", - "test": "c8 mocha test/index.test.js --timeout=5000 --exit" + "compute-test": "c8 mocha -p -j 2 test/periodic.test.js --timeout=600000", + "test": "c8 mocha -p -j 2 test/index.test.js --timeout=5000 --exit" }, "author": "Ace Nassri ", "license": "Apache-2.0", diff --git a/functions/env_vars/package.json b/functions/env_vars/package.json index 71d5128c25..db4879fd13 100644 --- a/functions/env_vars/package.json +++ b/functions/env_vars/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "devDependencies": { "mocha": "^10.0.0", diff --git a/functions/firebase/helloAnalytics/package.json b/functions/firebase/helloAnalytics/package.json index 68fc89d952..647d226696 100644 --- a/functions/firebase/helloAnalytics/package.json +++ b/functions/firebase/helloAnalytics/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/firebase/helloAuth/package.json b/functions/firebase/helloAuth/package.json index acba4c5a1b..bfa32a3cca 100644 --- a/functions/firebase/helloAuth/package.json +++ b/functions/firebase/helloAuth/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/firebase/helloFirestore/package.json b/functions/firebase/helloFirestore/package.json index 27c76de440..4dfb4a2de4 100644 --- a/functions/firebase/helloFirestore/package.json +++ b/functions/firebase/helloFirestore/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/firebase/helloRTDB/package.json b/functions/firebase/helloRTDB/package.json index e6f93b6f48..ac252c9805 100644 --- a/functions/firebase/helloRTDB/package.json +++ b/functions/firebase/helloRTDB/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/firebase/helloRemoteConfig/package.json b/functions/firebase/helloRemoteConfig/package.json index d5ab1ae623..696bbf722d 100644 --- a/functions/firebase/helloRemoteConfig/package.json +++ b/functions/firebase/helloRemoteConfig/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/firebase/makeUpperCase/package.json b/functions/firebase/makeUpperCase/package.json index 4a90a48766..95af37b4f5 100644 --- a/functions/firebase/makeUpperCase/package.json +++ b/functions/firebase/makeUpperCase/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/helloworld/helloError/package.json b/functions/helloworld/helloError/package.json index d08e1559d3..1e7ebb1207 100644 --- a/functions/helloworld/helloError/package.json +++ b/functions/helloworld/helloError/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.0" diff --git a/functions/helloworld/helloGCS/package.json b/functions/helloworld/helloGCS/package.json index 6333e73a96..f0bd5a1a85 100644 --- a/functions/helloworld/helloGCS/package.json +++ b/functions/helloworld/helloGCS/package.json @@ -12,8 +12,8 @@ "node": ">=12.0.0" }, "scripts": { - "unit-test": "c8 mocha test/*unit*test.js test/*integration*test.js --timeout=6000 --exit", - "system-test": "c8 mocha test/*system*test.js --timeout=600000 --exit", + "unit-test": "c8 mocha -p -j 2 test/*unit*test.js test/*integration*test.js --timeout=6000 --exit", + "system-test": "c8 mocha -p -j 2 test/*system*test.js --timeout=600000 --exit", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run unit-test" }, diff --git a/functions/helloworld/helloPubSub/package.json b/functions/helloworld/helloPubSub/package.json index b95437f8c8..fbe4c9e977 100644 --- a/functions/helloworld/helloPubSub/package.json +++ b/functions/helloworld/helloPubSub/package.json @@ -12,8 +12,8 @@ "node": ">=12.0.0" }, "scripts": { - "unit-test": "c8 mocha test/*unit*test.js test/*integration*test.js --timeout=6000 --exit", - "system-test": "c8 mocha test/*system*test.js --timeout=600000 --exit", + "unit-test": "c8 mocha -p -j 2 test/*unit*test.js test/*integration*test.js --timeout=6000 --exit", + "system-test": "c8 mocha -p -j 2 test/*system*test.js --timeout=600000 --exit", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run unit-test" }, diff --git a/functions/helloworld/helloworldGet/package.json b/functions/helloworld/helloworldGet/package.json index 2db30a27d0..1cadc2dc97 100644 --- a/functions/helloworld/helloworldGet/package.json +++ b/functions/helloworld/helloworldGet/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=6000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=6000 --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.0" diff --git a/functions/helloworld/helloworldHttp/package.json b/functions/helloworld/helloworldHttp/package.json index 0a124318eb..58beb3655f 100644 --- a/functions/helloworld/helloworldHttp/package.json +++ b/functions/helloworld/helloworldHttp/package.json @@ -12,8 +12,8 @@ "node": ">=12.0.0" }, "scripts": { - "unit-test": "c8 mocha test/index.test.js test/*unit*test.js test/*integration*test.js --timeout=6000 --exit", - "system-test": "c8 mocha test/*system*test.js --timeout=600000 --exit", + "unit-test": "c8 mocha -p -j 2 test/index.test.js test/*unit*test.js test/*integration*test.js --timeout=6000 --exit", + "system-test": "c8 mocha -p -j 2 test/*system*test.js --timeout=600000 --exit", "all-test": "npm run unit-test && npm run system-test", "test": "npm -- run unit-test" }, diff --git a/functions/http/corsEnabledFunction/package.json b/functions/http/corsEnabledFunction/package.json index a33138bb68..4924d371e2 100644 --- a/functions/http/corsEnabledFunction/package.json +++ b/functions/http/corsEnabledFunction/package.json @@ -12,7 +12,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" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/http/corsEnabledFunctionAuth/package.json b/functions/http/corsEnabledFunctionAuth/package.json index 391ae5f0a7..5d4bffb061 100644 --- a/functions/http/corsEnabledFunctionAuth/package.json +++ b/functions/http/corsEnabledFunctionAuth/package.json @@ -12,7 +12,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" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/http/httpContent/package.json b/functions/http/httpContent/package.json index d286496afc..937bf40a3e 100644 --- a/functions/http/httpContent/package.json +++ b/functions/http/httpContent/package.json @@ -12,7 +12,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" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/http/httpMethods/package.json b/functions/http/httpMethods/package.json index 497a814d9a..fc1edb730e 100644 --- a/functions/http/httpMethods/package.json +++ b/functions/http/httpMethods/package.json @@ -12,7 +12,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" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/http/parseXML/package.json b/functions/http/parseXML/package.json index c701db800f..97e3f5e35b 100644 --- a/functions/http/parseXML/package.json +++ b/functions/http/parseXML/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=6000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=6000 --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.2", diff --git a/functions/imagemagick/package.json b/functions/imagemagick/package.json index 19ba7c1968..e03b1b1053 100644 --- a/functions/imagemagick/package.json +++ b/functions/imagemagick/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "dependencies": { "@google-cloud/storage": "^7.0.0", diff --git a/functions/log/helloWorld/package.json b/functions/log/helloWorld/package.json index 280da99cbe..24d950f336 100644 --- a/functions/log/helloWorld/package.json +++ b/functions/log/helloWorld/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/log/processEntry/package.json b/functions/log/processEntry/package.json index 6931de77de..bea87aea66 100644 --- a/functions/log/processEntry/package.json +++ b/functions/log/processEntry/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/memorystore/redis/package.json b/functions/memorystore/redis/package.json index b4ce57debf..9d72080424 100644 --- a/functions/memorystore/redis/package.json +++ b/functions/memorystore/redis/package.json @@ -13,7 +13,7 @@ }, "main": "index.js", "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.2", diff --git a/functions/ocr/app/package.json b/functions/ocr/app/package.json index a4912004b1..a308eeff21 100644 --- a/functions/ocr/app/package.json +++ b/functions/ocr/app/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "dependencies": { "@google-cloud/pubsub": "^4.0.0", diff --git a/functions/pubsub/publish/package.json b/functions/pubsub/publish/package.json index f4fcb88758..b6ca838487 100644 --- a/functions/pubsub/publish/package.json +++ b/functions/pubsub/publish/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "dependencies": { "@google-cloud/pubsub": "^4.0.0" diff --git a/functions/pubsub/subscribe/package.json b/functions/pubsub/subscribe/package.json index 33c7e0b68a..6fd59ceb32 100644 --- a/functions/pubsub/subscribe/package.json +++ b/functions/pubsub/subscribe/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/scheduleinstance/package.json b/functions/scheduleinstance/package.json index badb33a4ab..801aa752b0 100644 --- a/functions/scheduleinstance/package.json +++ b/functions/scheduleinstance/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/security/package.json b/functions/security/package.json index 5a254f995a..da0c58d886 100644 --- a/functions/security/package.json +++ b/functions/security/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js" + "test": "c8 mocha -p -j 2 test/*.test.js" }, "dependencies": { "node-fetch": "^2.6.1" diff --git a/functions/slack/package.json b/functions/slack/package.json index 47f361f18b..6d4317a28c 100644 --- a/functions/slack/package.json +++ b/functions/slack/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.0", diff --git a/functions/spanner/package.json b/functions/spanner/package.json index e48de7a90a..4df665d2a2 100644 --- a/functions/spanner/package.json +++ b/functions/spanner/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "dependencies": { "@google-cloud/functions-framework": "^3.2.0", diff --git a/functions/speech-to-speech/functions/package.json b/functions/speech-to-speech/functions/package.json index 2e4201c122..fdddca693d 100644 --- a/functions/speech-to-speech/functions/package.json +++ b/functions/speech-to-speech/functions/package.json @@ -24,7 +24,7 @@ "storage" ], "scripts": { - "test": "c8 mocha --timeout 20000 test/*.test.js", + "test": "c8 mocha -p -j 2 --timeout 20000 test/*.test.js", "serve": "firebase serve --only functions", "shell": "firebase functions:shell", "start": "npm run shell", diff --git a/functions/tips/gcpApiCall/package.json b/functions/tips/gcpApiCall/package.json index 61f1c0a922..fcb28acf45 100644 --- a/functions/tips/gcpApiCall/package.json +++ b/functions/tips/gcpApiCall/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=60000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.3", diff --git a/functions/tips/retry/package.json b/functions/tips/retry/package.json index 3761786d36..15054e6aa4 100644 --- a/functions/tips/retry/package.json +++ b/functions/tips/retry/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=60000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/tips/scopeDemo/package.json b/functions/tips/scopeDemo/package.json index 6e05bb736f..1ebc59dd6b 100644 --- a/functions/tips/scopeDemo/package.json +++ b/functions/tips/scopeDemo/package.json @@ -12,7 +12,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/functions-framework": "^3.1.2" diff --git a/functions/v2/autoLabelInstance/package.json b/functions/v2/autoLabelInstance/package.json index 681864e1ea..e3239d5892 100644 --- a/functions/v2/autoLabelInstance/package.json +++ b/functions/v2/autoLabelInstance/package.json @@ -12,8 +12,8 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/index.test.js", - "e2e-test": "c8 mocha --timeout 60s test/system.test.js" + "test": "c8 mocha -p -j 2 test/index.test.js", + "e2e-test": "c8 mocha -p -j 2 --timeout 60s test/system.test.js" }, "dependencies": { "@google-cloud/compute": "^3.1.0", diff --git a/functions/v2/cloudEventLogging/package.json b/functions/v2/cloudEventLogging/package.json index 7142c5e41e..ef2c021cfc 100644 --- a/functions/v2/cloudEventLogging/package.json +++ b/functions/v2/cloudEventLogging/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js" + "test": "c8 mocha -p -j 2 test/*.test.js" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.1", diff --git a/functions/v2/firebase/firestore/helloFirestore/package.json b/functions/v2/firebase/firestore/helloFirestore/package.json index 0a22216252..9e2c3c2c20 100644 --- a/functions/v2/firebase/firestore/helloFirestore/package.json +++ b/functions/v2/firebase/firestore/helloFirestore/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/v2/firebase/firestore/makeUpperCase/package.json b/functions/v2/firebase/firestore/makeUpperCase/package.json index 324d29d3af..d927fcaeee 100644 --- a/functions/v2/firebase/firestore/makeUpperCase/package.json +++ b/functions/v2/firebase/firestore/makeUpperCase/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/v2/firebase/remote-config/helloRemoteConfig/package.json b/functions/v2/firebase/remote-config/helloRemoteConfig/package.json index 3cda9ad7b4..345a21e45b 100644 --- a/functions/v2/firebase/remote-config/helloRemoteConfig/package.json +++ b/functions/v2/firebase/remote-config/helloRemoteConfig/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/v2/firebase/rtdb/helloRTDB/package.json b/functions/v2/firebase/rtdb/helloRTDB/package.json index b265ddc603..1f18e9b28e 100644 --- a/functions/v2/firebase/rtdb/helloRTDB/package.json +++ b/functions/v2/firebase/rtdb/helloRTDB/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha -T 30s test/*.test.js" + "test": "c8 mocha -p -j 2 -T 30s test/*.test.js" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/v2/helloAuditLog/package.json b/functions/v2/helloAuditLog/package.json index 57627a0635..9647939354 100644 --- a/functions/v2/helloAuditLog/package.json +++ b/functions/v2/helloAuditLog/package.json @@ -12,7 +12,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/functions-framework": "^3.0.0" diff --git a/functions/v2/helloBigQuery/package.json b/functions/v2/helloBigQuery/package.json index 8f7f37ed2b..5fb5ad646a 100644 --- a/functions/v2/helloBigQuery/package.json +++ b/functions/v2/helloBigQuery/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", diff --git a/functions/v2/helloGCS/package.json b/functions/v2/helloGCS/package.json index 1ebca82262..b36961f24c 100644 --- a/functions/v2/helloGCS/package.json +++ b/functions/v2/helloGCS/package.json @@ -12,7 +12,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/functions-framework": "^3.0.0" diff --git a/functions/v2/helloPubSub/package.json b/functions/v2/helloPubSub/package.json index 27f0c1d85d..8bd1ca3c94 100644 --- a/functions/v2/helloPubSub/package.json +++ b/functions/v2/helloPubSub/package.json @@ -12,7 +12,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/functions-framework": "^3.0.0" diff --git a/functions/v2/httpLogging/package.json b/functions/v2/httpLogging/package.json index 21dd72b164..da18627ac5 100644 --- a/functions/v2/httpLogging/package.json +++ b/functions/v2/httpLogging/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js", + "test": "c8 mocha -p -j 2 test/*.test.js", "start": "npx @google-cloud/functions-framework --target=structuredLogging" }, "dependencies": { diff --git a/functions/v2/imagemagick/package.json b/functions/v2/imagemagick/package.json index 58680c8e9d..4d9f693923 100644 --- a/functions/v2/imagemagick/package.json +++ b/functions/v2/imagemagick/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000 --exit" }, "dependencies": { "@google-cloud/functions-framework": "^3.1.0", diff --git a/functions/v2/log/processEntry/package.json b/functions/v2/log/processEntry/package.json index 94ed250772..eb83b520f8 100644 --- a/functions/v2/log/processEntry/package.json +++ b/functions/v2/log/processEntry/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/v2/ocr/app/package.json b/functions/v2/ocr/app/package.json index 3d7a3e536d..90941b4b6e 100644 --- a/functions/v2/ocr/app/package.json +++ b/functions/v2/ocr/app/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "dependencies": { "@google-cloud/functions-framework": "^3.2.0", diff --git a/functions/v2/responseStreaming/package.json b/functions/v2/responseStreaming/package.json index fa6ab26093..deaab0d441 100644 --- a/functions/v2/responseStreaming/package.json +++ b/functions/v2/responseStreaming/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=20000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=20000" }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", diff --git a/functions/v2/tips/avoidInfiniteRetries/package.json b/functions/v2/tips/avoidInfiniteRetries/package.json index ea16105e7c..513c599cb1 100644 --- a/functions/v2/tips/avoidInfiniteRetries/package.json +++ b/functions/v2/tips/avoidInfiniteRetries/package.json @@ -12,7 +12,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/functions-framework": "^3.1.3" diff --git a/functions/v2/tips/retry/package.json b/functions/v2/tips/retry/package.json index d84ceb1402..c186ee943c 100644 --- a/functions/v2/tips/retry/package.json +++ b/functions/v2/tips/retry/package.json @@ -12,7 +12,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha test/*.test.js --timeout=60000 --exit" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit" }, "devDependencies": { "c8": "^8.0.0", diff --git a/functions/v2/typed/googlechatbot/package.json b/functions/v2/typed/googlechatbot/package.json index fdb508caab..7882c94959 100644 --- a/functions/v2/typed/googlechatbot/package.json +++ b/functions/v2/typed/googlechatbot/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "c8 mocha test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000" }, "author": "", "license": "ISC", diff --git a/functions/v2/typed/greeting/package.json b/functions/v2/typed/greeting/package.json index 60471cc5f4..d6d93d6c49 100644 --- a/functions/v2/typed/greeting/package.json +++ b/functions/v2/typed/greeting/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "c8 mocha test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000" }, "author": "", "license": "ISC", diff --git a/game-servers/snippets/package.json b/game-servers/snippets/package.json index c5630b9e59..7a29802842 100644 --- a/game-servers/snippets/package.json +++ b/game-servers/snippets/package.json @@ -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/game-servers": "^3.1.3" diff --git a/healthcare/consent/package.json b/healthcare/consent/package.json index ca374cd825..8104fedc31 100644 --- a/healthcare/consent/package.json +++ b/healthcare/consent/package.json @@ -9,7 +9,7 @@ "node": ">=8.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/healthcare/datasets/package.json b/healthcare/datasets/package.json index 665dbdd6ef..c73a22c3c2 100644 --- a/healthcare/datasets/package.json +++ b/healthcare/datasets/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "c8": "^8.0.0", diff --git a/healthcare/dicom/package.json b/healthcare/dicom/package.json index 98959b5720..1e94ab51e6 100644 --- a/healthcare/dicom/package.json +++ b/healthcare/dicom/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "@google-cloud/pubsub": "^4.0.0", diff --git a/healthcare/fhir/package.json b/healthcare/fhir/package.json index 0ceff28138..49fd676295 100644 --- a/healthcare/fhir/package.json +++ b/healthcare/fhir/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "@google-cloud/pubsub": "^4.0.0", diff --git a/healthcare/hl7v2/package.json b/healthcare/hl7v2/package.json index 81185a88d1..2671163895 100644 --- a/healthcare/hl7v2/package.json +++ b/healthcare/hl7v2/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/*.test.js --timeout=60000" + "test": "c8 mocha -p -j 2 system-test/*.test.js --timeout=60000" }, "devDependencies": { "@google-cloud/pubsub": "^4.0.0", diff --git a/iam/deny/package.json b/iam/deny/package.json index cf72695bd9..ddbeb0285a 100644 --- a/iam/deny/package.json +++ b/iam/deny/package.json @@ -11,7 +11,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/iam": "^1.0.0" diff --git a/kms/package.json b/kms/package.json index a3014abe03..e04c3c58ef 100644 --- a/kms/package.json +++ b/kms/package.json @@ -11,7 +11,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha --recursive test/ --timeout=800000" + "test": "c8 mocha -p -j 2 --recursive test/ --timeout=800000" }, "dependencies": { "@google-cloud/kms": "^4.0.0", diff --git a/media/livestream/package.json b/media/livestream/package.json index 930374f0bb..512b3b8cdb 100644 --- a/media/livestream/package.json +++ b/media/livestream/package.json @@ -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/livestream": "^1.0.0" diff --git a/media/transcoder/package.json b/media/transcoder/package.json index 2fccfc7e19..d4130ee5e3 100644 --- a/media/transcoder/package.json +++ b/media/transcoder/package.json @@ -11,7 +11,7 @@ "!test" ], "scripts": { - "test": "c8 mocha --timeout 600000 test/*.js" + "test": "c8 mocha -p -j 2 --timeout 600000 test/*.js" }, "dependencies": { "@google-cloud/video-transcoder": "^2.7.0" diff --git a/media/video-stitcher/package.json b/media/video-stitcher/package.json index 5aa2f9da3f..055b1c55ad 100644 --- a/media/video-stitcher/package.json +++ b/media/video-stitcher/package.json @@ -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/video-stitcher": "^0.4.0" diff --git a/mediatranslation/package.json b/mediatranslation/package.json index 1f45c21145..859284c312 100644 --- a/mediatranslation/package.json +++ b/mediatranslation/package.json @@ -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/media-translation": "^4.0.0", diff --git a/monitoring/opencensus/package.json b/monitoring/opencensus/package.json index bc96c47440..fbc8542d98 100644 --- a/monitoring/opencensus/package.json +++ b/monitoring/opencensus/package.json @@ -5,7 +5,7 @@ "main": "app.js", "scripts": { "start": "node app.js", - "test": "c8 mocha -- system-test/*.test.js --timeout=5000 --exit" + "test": "c8 mocha -p -j 2 -- system-test/*.test.js --timeout=5000 --exit" }, "author": "Yuri Grinshteyn", "license": "Apache-2.0", diff --git a/monitoring/snippets/package.json b/monitoring/snippets/package.json index 222ce62893..a9e92fd1df 100644 --- a/monitoring/snippets/package.json +++ b/monitoring/snippets/package.json @@ -11,7 +11,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha --timeout 600000" + "test": "c8 mocha -p -j 2 --timeout 600000" }, "dependencies": { "@google-cloud/monitoring": "^4.0.0", diff --git a/opencensus/package.json b/opencensus/package.json index 1b749c77e4..64a555f1f9 100644 --- a/opencensus/package.json +++ b/opencensus/package.json @@ -14,7 +14,7 @@ }, "scripts": { "start": "node metrics-quickstart.js", - "test": "c8 mocha -- system-test/*.test.js --timeout=5000 --exit" + "test": "c8 mocha -p -j 2 -- system-test/*.test.js --timeout=5000 --exit" }, "dependencies": { "@opencensus/core": "^0.1.0", diff --git a/recaptcha_enterprise/snippets/package.json b/recaptcha_enterprise/snippets/package.json index e56a3887a5..b8bc3a3a27 100644 --- a/recaptcha_enterprise/snippets/package.json +++ b/recaptcha_enterprise/snippets/package.json @@ -15,7 +15,7 @@ "build": "tsc -p .", "fix": "gts fix", "lint": "gts lint", - "test": "c8 mocha --loader=ts-node/esm --extension ts --timeout 10000 --exit" + "test": "c8 mocha -p -j 2 --loader=ts-node/esm --extension ts --timeout 10000 --exit" }, "dependencies": { "@google-cloud/recaptcha-enterprise": "^4.0.0", diff --git a/retail/package.json b/retail/package.json index 99a9758629..0c41da9831 100644 --- a/retail/package.json +++ b/retail/package.json @@ -10,7 +10,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha" + "test": "c8 mocha -p -j 2" }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", diff --git a/run/filesystem/package.json b/run/filesystem/package.json index 05d061f455..1b5e2213b2 100644 --- a/run/filesystem/package.json +++ b/run/filesystem/package.json @@ -5,8 +5,8 @@ "main": "index.js", "scripts": { "start": "node index.js", - "test": "c8 mocha test/index.test.js --exit", - "system-test": "c8 mocha test/system.test.js --timeout=360000 --exit" + "test": "c8 mocha -p -j 2 test/index.test.js --exit", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit" }, "engines": { "node": ">=12.0.0" diff --git a/run/hello-broken/package.json b/run/hello-broken/package.json index 2c354de2e6..09ad68bcd8 100644 --- a/run/hello-broken/package.json +++ b/run/hello-broken/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "node index.js", "test": "echo \"Error: no test specified\" && exit 0", - "system-test": "NAME=Cloud c8 mocha test/system.test.js --timeout=360000 --exit" + "system-test": "NAME=Cloud c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit" }, "engines": { "node": ">=12.0.0" diff --git a/run/helloworld/package.json b/run/helloworld/package.json index 8de28feb98..c207de57e4 100644 --- a/run/helloworld/package.json +++ b/run/helloworld/package.json @@ -6,8 +6,8 @@ "main": "index.js", "scripts": { "start": "node index.js", - "test": "c8 mocha test/index.test.js --exit", - "system-test": "NAME=Cloud c8 mocha test/system.test.js --timeout=180000" + "test": "c8 mocha -p -j 2 test/index.test.js --exit", + "system-test": "NAME=Cloud c8 mocha -p -j 2 test/system.test.js --timeout=180000" }, "engines": { "node": ">= 12.0.0" diff --git a/run/idp-sql/package.json b/run/idp-sql/package.json index 393059255e..e7879d473c 100644 --- a/run/idp-sql/package.json +++ b/run/idp-sql/package.json @@ -14,8 +14,8 @@ }, "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --timeout=120000 --exit", - "system-test": "c8 mocha test/system.test.js --timeout=1800000 --exit" + "test": "c8 mocha -p -j 2 test/app.test.js --timeout=120000 --exit", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit" }, "dependencies": { "express": "^4.16.2", diff --git a/run/image-processing/package.json b/run/image-processing/package.json index 4cc5f93523..ee276e8056 100644 --- a/run/image-processing/package.json +++ b/run/image-processing/package.json @@ -15,8 +15,8 @@ }, "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --check-leaks --timeout=5000", - "system-test": "c8 mocha test/system.test.js --timeout=360000 --exit" + "test": "c8 mocha -p -j 2 test/app.test.js --check-leaks --timeout=5000", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit" }, "dependencies": { "@google-cloud/storage": "^7.0.0", diff --git a/run/jobs/package.json b/run/jobs/package.json index 7c59c48853..7a38e45345 100644 --- a/run/jobs/package.json +++ b/run/jobs/package.json @@ -5,8 +5,8 @@ "main": "index.js", "scripts": { "start": "node index.js", - "test": "c8 mocha test/index.test.js --exit", - "system-test": "c8 mocha test/system.test.js --timeout=600000 --exit" + "test": "c8 mocha -p -j 2 test/index.test.js --exit", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=600000 --exit" }, "author": "Google LLC", "license": "Apache-2.0", diff --git a/run/logging-manual/package.json b/run/logging-manual/package.json index 9d528209a9..0893f0e57a 100644 --- a/run/logging-manual/package.json +++ b/run/logging-manual/package.json @@ -10,7 +10,7 @@ "scripts": { "start": "node index.js", "test": "echo \"Error: no test specified\" && exit 0", - "system-test": "c8 mocha test/system.test.js --timeout=800000 --exit" + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=800000 --exit" }, "author": "", "license": "Apache-2.0", diff --git a/run/markdown-preview/editor/package.json b/run/markdown-preview/editor/package.json index 4dc73da2a9..bf20f036da 100644 --- a/run/markdown-preview/editor/package.json +++ b/run/markdown-preview/editor/package.json @@ -15,8 +15,8 @@ "main": "main.js", "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --timeout=10000 --exit", - "system-test": "c8 mocha test/system.test.js --timeout=480000 --exit" + "test": "c8 mocha -p -j 2 test/app.test.js --timeout=10000 --exit", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=480000 --exit" }, "dependencies": { "express": "^4.17.1", diff --git a/run/markdown-preview/renderer/package.json b/run/markdown-preview/renderer/package.json index a10da1bbcd..039ccfb948 100644 --- a/run/markdown-preview/renderer/package.json +++ b/run/markdown-preview/renderer/package.json @@ -14,8 +14,8 @@ "main": "index.js", "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --exit", - "system-test": "c8 mocha test/system.test.js --timeout=360000 --exit" + "test": "c8 mocha -p -j 2 test/app.test.js --exit", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit" }, "dependencies": { "express": "^4.17.1", diff --git a/run/pubsub/package.json b/run/pubsub/package.json index 7c5d97b9c3..5d1cfd134f 100644 --- a/run/pubsub/package.json +++ b/run/pubsub/package.json @@ -15,8 +15,8 @@ }, "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --check-leaks", - "system-test": "c8 mocha test/system.test.js --timeout=360000 --exit" + "test": "c8 mocha -p -j 2 test/app.test.js --check-leaks", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit" }, "dependencies": { "express": "^4.16.4" diff --git a/run/system-package/package.json b/run/system-package/package.json index d6c09be95c..bb4c827a19 100644 --- a/run/system-package/package.json +++ b/run/system-package/package.json @@ -6,8 +6,8 @@ "private": true, "scripts": { "start": "node index.js", - "test": "c8 mocha test/app.test.js --check-leaks", - "system-test": "c8 mocha test/system.test.js --timeout=360000 --exit" + "test": "c8 mocha -p -j 2 test/app.test.js --check-leaks", + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit" }, "engines": { "node": ">= 12.0.0" diff --git a/run/websockets/package.json b/run/websockets/package.json index 7bf0b7e3b8..20ac8bcfda 100644 --- a/run/websockets/package.json +++ b/run/websockets/package.json @@ -8,7 +8,7 @@ "scripts": { "start": "node index.js", "test": "echo \"Error: no test specified\" && exit 0", - "system-test": "c8 mocha test/system.test.js --timeout=420000 --exit" + "system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=420000 --exit" }, "engines": { "node": ">=16.0.0" diff --git a/scheduler/package.json b/scheduler/package.json index a017f1823c..279ff81fd2 100644 --- a/scheduler/package.json +++ b/scheduler/package.json @@ -14,7 +14,7 @@ "build": "tsc -p .", "fix": "gts fix", "lint": "gts lint", - "test": "c8 mocha --loader=ts-node/esm --extension ts --timeout 10000 --exit" + "test": "c8 mocha -p -j 2 --loader=ts-node/esm --extension ts --timeout 10000 --exit" }, "dependencies": { "@google-cloud/scheduler": "^4.0.0" diff --git a/secret-manager/package.json b/secret-manager/package.json index eabdf78635..2261224207 100644 --- a/secret-manager/package.json +++ b/secret-manager/package.json @@ -11,7 +11,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha --recursive test/ --timeout=800000" + "test": "c8 mocha -p -j 2 --recursive test/ --timeout=800000" }, "dependencies": { "@google-cloud/secret-manager": "^5.0.0" diff --git a/security-center/snippets/package.json b/security-center/snippets/package.json index 01266d724e..f837465472 100644 --- a/security-center/snippets/package.json +++ b/security-center/snippets/package.json @@ -9,7 +9,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha system-test/ --recursive --timeout 6000000" + "test": "c8 mocha -p -j 2 system-test/ --recursive --timeout 6000000" }, "license": "Apache-2.0", "dependencies": { diff --git a/service-directory/snippets/package.json b/service-directory/snippets/package.json index 96273169f0..cafd564bcd 100644 --- a/service-directory/snippets/package.json +++ b/service-directory/snippets/package.json @@ -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/service-directory": "^5.0.0" diff --git a/speech/package.json b/speech/package.json index dfea2f9ece..9ac4af289d 100644 --- a/speech/package.json +++ b/speech/package.json @@ -12,7 +12,7 @@ "resources/" ], "scripts": { - "test": "c8 mocha system-test --timeout 600000" + "test": "c8 mocha -p -j 2 system-test --timeout 600000" }, "dependencies": { "@google-cloud/speech": "^6.0.0", diff --git a/storagetransfer/package.json b/storagetransfer/package.json index 76fbefd6fd..b139464855 100644 --- a/storagetransfer/package.json +++ b/storagetransfer/package.json @@ -10,7 +10,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha ---parallel --timeout 600000 test/*.test.js" + "test": "c8 mocha -p -j 2 ---parallel --timeout 600000 test/*.test.js" }, "dependencies": { "@google-cloud/storage-transfer": "^3.0.0" diff --git a/talent/package.json b/talent/package.json index 775f46544e..6875eb742b 100644 --- a/talent/package.json +++ b/talent/package.json @@ -12,7 +12,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha --timeout 600000", + "test": "c8 mocha -p -j 2 --timeout 600000", "lint": "eslint src --ext .ts", "lint:fix": "npm run lint -- --fix" }, diff --git a/texttospeech/package.json b/texttospeech/package.json index 90d5e1291a..994d70a89b 100644 --- a/texttospeech/package.json +++ b/texttospeech/package.json @@ -11,7 +11,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha --timeout=60000" + "test": "c8 mocha -p -j 2 --timeout=60000" }, "dependencies": { "@google-cloud/text-to-speech": "^5.0.0", diff --git a/translate/package.json b/translate/package.json index c908c8c132..1e27e02624 100644 --- a/translate/package.json +++ b/translate/package.json @@ -11,7 +11,7 @@ "node": ">=12.0.0" }, "scripts": { - "test": "c8 mocha --recursive --timeout 240000" + "test": "c8 mocha -p -j 2 --recursive --timeout 240000" }, "dependencies": { "@google-cloud/automl": "^3.0.0", diff --git a/video-intelligence/package.json b/video-intelligence/package.json index f847a43937..8300355129 100644 --- a/video-intelligence/package.json +++ b/video-intelligence/package.json @@ -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/video-intelligence": "^5.0.0", diff --git a/vision/package.json b/vision/package.json index 481900fec9..f0fe43eeb8 100644 --- a/vision/package.json +++ b/vision/package.json @@ -10,7 +10,7 @@ "*.js" ], "scripts": { - "test": "c8 mocha system-test --timeout 600000" + "test": "c8 mocha -p -j 2 system-test --timeout 600000" }, "dependencies": { "@google-cloud/vision": "^3.1.2", diff --git a/workflows/invoke-private-endpoint/package.json b/workflows/invoke-private-endpoint/package.json index c9190955f4..ce3482183a 100644 --- a/workflows/invoke-private-endpoint/package.json +++ b/workflows/invoke-private-endpoint/package.json @@ -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" diff --git a/workflows/package.json b/workflows/package.json index a078e7c4d5..afa1f89d88 100644 --- a/workflows/package.json +++ b/workflows/package.json @@ -10,7 +10,7 @@ "build": "tsc -p .", "fix": "gts fix", "lint": "gts lint", - "test": "c8 mocha --loader=ts-node/esm --extension ts --timeout 600000 --exit" + "test": "c8 mocha -p -j 2 --loader=ts-node/esm --extension ts --timeout 600000 --exit" }, "dependencies": { "@google-cloud/workflows": "^2.3.1"