test: scope e2e timeouts to startup and per-it (#89929)
This aims to avoid us having tests stall for upwards of 240s when a single assertion in the test stalls. This is very common currently. To also avoid wasting the entire time of resetting the test suite this also allows 1 retry for individual failed assertions. This won't always work since some assertions rely on previous setup so this also keeps the entire test suite retry handling as a fallback. This change is not applied for dev tests as they check HMR and compile lazily. ## Summary - keep elevated Jest timeout for test setup/startup in e2e-utils - enforce a 60s default timeout for individual `it`/`test` cases - apply one retry per individual test via `jest.retryTimes(1)` ## Verification - pnpm testonly test/development/gssp-notfound/index.test.ts - pnpm testonly test/development/enoent-during-require/index.test.ts - pnpm testonly test/e2e/custom-app-render/custom-app-render.test.ts Tested against our deploy tests to see if this helps: Current run [21967823508](https://github.com/vercel/next.js/actions/runs/21967823508) Jobs: 24 (with test-runner output: 20) Whole-suite retry starts: 11 (retry 1: 8, retry 2+: 3) Jobs that needed suite retries: 8 Unique test files retried: 7 Previous run [21964085768](https://github.com/vercel/next.js/actions/runs/21964085768) Jobs: 26 (with test-runner output: 20) Whole-suite retry starts: 18 (retry 1: 13, retry 2+: 5) Jobs that needed suite retries: 9 Unique test files retried: 12
Showing
Please
register
or
sign in
to comment