From ce175a4279575c6596af84ab05ddb2a32eb6b1a8 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 26 Sep 2023 15:54:21 -0700 Subject: [PATCH 1/3] Decrease default test timeouts --- test/jest-setup-after-env.ts | 2 +- test/lib/e2e-utils.ts | 2 +- test/production/pages-dir/production/test/index.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/jest-setup-after-env.ts b/test/jest-setup-after-env.ts index a1e63f8daa96e..76ed2c686ec87 100644 --- a/test/jest-setup-after-env.ts +++ b/test/jest-setup-after-env.ts @@ -5,4 +5,4 @@ expect.extend(matchers) // A default max-timeout of 90 seconds is allowed // per test we should aim to bring this down though -jest.setTimeout((process.platform === 'win32' ? 180 : 120) * 1000) +jest.setTimeout((process.platform === 'win32' ? 180 : 60) * 1000) diff --git a/test/lib/e2e-utils.ts b/test/lib/e2e-utils.ts index 15f87ad343adc..a9051a19945c7 100644 --- a/test/lib/e2e-utils.ts +++ b/test/lib/e2e-utils.ts @@ -14,7 +14,7 @@ export type { NextInstance } // if either test runs for the --turbo or have a custom timeout, set reduced timeout instead. // this is due to current --turbo test have a lot of tests fails with timeouts, ends up the whole // test job exceeds the 6 hours limit. -let testTimeout = shouldRunTurboDevTest() ? (240 * 1000) / 4 : 240 * 1000 +let testTimeout = shouldRunTurboDevTest() ? (240 * 1000) / 4 : 120 * 1000 if (process.env.NEXT_E2E_TEST_TIMEOUT) { try { testTimeout = parseInt(process.env.NEXT_E2E_TEST_TIMEOUT, 10) diff --git a/test/production/pages-dir/production/test/index.test.ts b/test/production/pages-dir/production/test/index.test.ts index 8d17acf04b435..35d500050e5d9 100644 --- a/test/production/pages-dir/production/test/index.test.ts +++ b/test/production/pages-dir/production/test/index.test.ts @@ -26,7 +26,7 @@ import { createNextDescribe } from 'e2e-utils' const glob = promisify(globOriginal) if (process.env.TEST_WASM) { - jest.setTimeout(240 * 1000) + jest.setTimeout(120 * 1000) } createNextDescribe( From b1934646ed78124cacefeec9d34f89a5f5897dbf Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 27 Sep 2023 16:27:04 -0700 Subject: [PATCH 2/3] update specific test --- test/development/acceptance-app/app-hmr-changes.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/development/acceptance-app/app-hmr-changes.test.ts b/test/development/acceptance-app/app-hmr-changes.test.ts index 99eeee47abe4e..5a388e7702a92 100644 --- a/test/development/acceptance-app/app-hmr-changes.test.ts +++ b/test/development/acceptance-app/app-hmr-changes.test.ts @@ -2,6 +2,8 @@ import { FileRef, nextTestSetup } from 'e2e-utils' import { sandbox } from 'development-sandbox' import path from 'path' +jest.setTimeout(240 * 1000) + describe('Error overlay - RSC build errors', () => { const { next } = nextTestSetup({ files: new FileRef(path.join(__dirname, 'fixtures', 'app-hmr-changes')), From fc723b822c396169d989a33678281def648049ec Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 27 Sep 2023 16:35:21 -0700 Subject: [PATCH 3/3] update max job time as well --- .github/workflows/build_reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_reusable.yml b/.github/workflows/build_reusable.yml index d468808b4f3f4..be5bc2afa1e45 100644 --- a/.github/workflows/build_reusable.yml +++ b/.github/workflows/build_reusable.yml @@ -77,7 +77,7 @@ env: jobs: build: - timeout-minutes: 25 + timeout-minutes: 15 runs-on: - 'self-hosted' - 'linux'