mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
76e24273c7
### What? Stabilizes the read-only source HMR page deletion and recreation test in webpack development mode. ### Why? The test reloads after restoring a deleted page because webpack does not automatically refresh when the route reappears. In polling watch mode, that reload could wait for the full page load or be aborted by a concurrent Fast Refresh navigation. Either error escaped the retry callback, allowing one transient navigation race to fail the test before it could retry. ### How? The webpack-only reload now waits only until the document is available instead of waiting on potentially slow subresources. Transient reload failures are handled inside the retry callback, while the existing page-content assertion remains the success condition. This preserves the test's intent and ensures a route that does not recover still fails. ### Verification - Fresh `pnpm build` followed by a cold headless webpack run: 3 passed - Three additional headless webpack runs: 3 passed each - Headless Turbopack run: 2 passed, 1 expected skip - Focused Prettier and ESLint checks <!-- NEXT_JS_LLM --> 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>