From 9ba2fac283ec5094956b09f7a733e670c2681cbc Mon Sep 17 00:00:00 2001 From: Chris Price Date: Tue, 7 Nov 2023 14:02:13 -0800 Subject: [PATCH] fix: set maxWorkers to 1 for jest integration tests to see if it helps flakiness (#1013) We are seeing a lot of timeouts in CI test runs, and the only guess that I have is that there is a lot of CPU contention on the tiny runner machines due to running too many tests concurrently. This commit sets the max number of workers to 1 to see if that cuts down on timeouts. --- packages/client-sdk-nodejs/package.json | 8 ++++---- packages/client-sdk-web/package.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/client-sdk-nodejs/package.json b/packages/client-sdk-nodejs/package.json index 3d7972f8f..93d9e0e38 100644 --- a/packages/client-sdk-nodejs/package.json +++ b/packages/client-sdk-nodejs/package.json @@ -14,11 +14,11 @@ }, "scripts": { "prebuild": "eslint . --ext .ts", - "test": "jest --testPathIgnorePatterns auth-client.test.ts --reporters=jest-silent-reporter", - "integration-test-auth": "jest auth-client.test.ts --reporters=jest-silent-reporter", - "integration-test-vector": "jest vector-control-plane.test.ts vector-data-plane.test.ts --reporters=jest-silent-reporter", + "test": "jest --testPathIgnorePatterns auth-client.test.ts --reporters=jest-silent-reporter --maxWorkers 1", + "integration-test-auth": "jest auth-client.test.ts --reporters=jest-silent-reporter --maxWorkers 1", + "integration-test-vector": "jest vector-control-plane.test.ts vector-data-plane.test.ts --reporters=jest-silent-reporter --maxWorkers 1", "unit-test": "jest unit --reporters=jest-silent-reporter", - "integration-test": "jest integration --reporters=jest-silent-reporter --testPathIgnorePatterns \"auth-client.test.ts|vector-control-plane.test.ts|vector-data-plane.test.ts\"", + "integration-test": "jest integration --reporters=jest-silent-reporter --testPathIgnorePatterns \"auth-client.test.ts|vector-control-plane.test.ts|vector-data-plane.test.ts\" --maxWorkers 1", "build-deps": "cd ../core && npm run build && cd - && cd ../common-integration-tests && npm run build && cd -", "build-and-run-tests": "npm run build-deps && jest --testPathIgnorePatterns auth-client.test.ts --maxWorkers 1", "lint": "eslint . --ext .ts", diff --git a/packages/client-sdk-web/package.json b/packages/client-sdk-web/package.json index e0a04e457..a87161964 100644 --- a/packages/client-sdk-web/package.json +++ b/packages/client-sdk-web/package.json @@ -14,11 +14,11 @@ }, "scripts": { "prebuild": "eslint . --ext .ts", - "test": "jest --testPathIgnorePatterns auth-client.test.ts --reporters=jest-silent-reporter", + "test": "jest --testPathIgnorePatterns auth-client.test.ts --reporters=jest-silent-reporter --maxWorkers 1", "unit-test": "jest unit --reporters=jest-silent-reporter", - "integration-test-auth": "jest auth-client.test.ts --reporters=jest-silent-reporter", - "integration-test-vector": "jest vector-control-plane.test.ts vector-data-plane.test.ts --reporters=jest-silent-reporter", - "integration-test": "jest integration --reporters=jest-silent-reporter --testPathIgnorePatterns \"auth-client.test.ts|vector-control-plane.test.ts|vector-data-plane.test.ts\"", + "integration-test-auth": "jest auth-client.test.ts --reporters=jest-silent-reporter --maxWorkers 1", + "integration-test-vector": "jest vector-control-plane.test.ts vector-data-plane.test.ts --reporters=jest-silent-reporter --maxWorkers 1", + "integration-test": "jest integration --reporters=jest-silent-reporter --testPathIgnorePatterns \"auth-client.test.ts|vector-control-plane.test.ts|vector-data-plane.test.ts\" --maxWorkers 1", "build-deps": "cd ../core && npm run build && cd - && cd ../common-integration-tests && npm run build && cd -", "build-and-run-tests": "npm run build-deps && jest --testPathIgnorePatterns auth-client.test.ts --maxWorkers 1", "lint": "eslint . --ext .ts",