Decrease default test timeouts (#56116)

When tests are timing out we shouldn't wait for 4 minutes before it officially fails so this brings down the default test timeouts
This commit is contained in:
JJ Kasper 2023-09-27 16:55:20 -07:00 committed by GitHub
parent f5ac079e54
commit fb04b85bb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 4 deletions

View file

@ -77,7 +77,7 @@ env:
jobs:
build:
timeout-minutes: 25
timeout-minutes: 15
runs-on:
- 'self-hosted'
- 'linux'

View file

@ -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')),

View file

@ -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)

View file

@ -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)

View file

@ -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(