test: allow custom webpack deployments to complete (#100054)
### What? Gives the `--custom-webpack` e2e tests that start their own Next.js instance a 240-second per-test timeout, matching the existing `explicit application directory` test in the same file. The tests are the shadowed-webpack test, the missing-webpack error test, and both conflicting-bundler-flag tests. Test bodies and assertions are unchanged, and deploy mode keeps running them. ### Why? `custom-webpack.test.ts` (added in #99234) fails every attempt in Vercel deploy tests on v16.5.0-canary.7 and canary.8 with `Exceeded timeout of 60000 ms` in `with a shadowed webpack and no pnpm hoisting`: - https://github.com/vercel/next.js/actions/runs/38096257736/job/114359133787 - https://github.com/vercel/next.js/actions/runs/38006180482/job/114077823665 These suites use `skipStart`, so the instance starts inside the test rather than in setup. In deploy mode, starting means waiting for the whole Vercel deployment (install, build, deploy; about 60–90 s in these runs). The e2e harness gives each test 60 s unless the test sets its own timeout. The shadowed-webpack test is cut off at 60 s while its deployment is still building. The explicit-application-directory test passes (61–88 s) only because it already has a longer timeout. The other three tests pass, but at 45–57 s, close enough to fail next. ### How? A per-test timeout fits the file's existing convention and keeps deployment coverage. Skipping in deploy mode would remove the only deployed check that the app's own webpack is used, and `test/AGENTS.md` discourages it. Moving the start into `beforeAll` would restructure these suites, which keep the start inside the test because each test sets up its own preconditions first. The trade-off is that a real hang in these tests now fails after up to 4 minutes instead of 1. ### Verification - Confirmed the root cause against both job logs and the e2e/deploy harness - Compared the file's test registrations before and after: same 8 tests with unchanged bodies, exactly 4 new timeouts, and every test that starts an instance itself is covered - `prettier --check` (repo-pinned version) and `git diff --check` - Not run: eslint / type-check (no workspace dependencies in the sandbox) and local or deploy e2e (no build outputs or Vercel credentials). The deploy run still needs to be confirmed in the deploy test workflow. <!-- NEXT_JS_LLM --> <!-- fleet db94cc8e-c6ca-4069-9894-120a370db8c4 --> Co-authored-by:vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by:
Tobias Koppers <1365881+sokra@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment