test(nextjs): Skip flaky tests affected by Turbopack 404s in dev mode#20993
Merged
Conversation
Looks like Turbopack sometimes returns 404 for nested dynamic routes like /parametrized/[one]/beep/[two]. We drop 404 server transactions by default, causing timeouts in the test's `waitForTransaction`. We skip this test in dev mode for now. Closes: #20992
Turbopack intermittently returns 404 for dynamic routes like /route-handler/[xoxo]/... in dev mode, causing all route handler tests to time out waiting for Sentry events that never arrive. Skip the four affected tests in dev mode. Also removes now-dead dev-mode conditionals since the tests no longer run in that env.
Same Turbopack 404 issue as nextjs-16: dynamic routes under /route-handler/[xoxo]/... intermittently 404 in dev mode, so the three route handler tests time out waiting for events.
Same Turbopack 404 issue: /parameterized/[one]/beep/[two] intermittently 404s in dev mode, so the streamed span test times out.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e9b074b. Configure here.
isDevMode matches both TEST_ENV=development (turbopack) and TEST_ENV=development-webpack, which silently drops test coverage for the webpack dev variant where the Turbopack 404 issue doesn't apply. Add isTurbopackDevMode (exact match on 'development') and use it for all Turbopack-specific skips. Also skip the dynamic page test in server-components.test.ts (/nested-layout/[dynamic]) which has the same Turbopack 404 flake.
b787999 to
c7bd25e
Compare
mydea
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Turbopack intermittently returns 404 for dynamic routes in dev mode (e.g.
/route-handler/[xoxo]/...,/parameterized/[one]/beep/[two]). We drop 404 transactions so when this happens, route handlers never execute, no Sentry events are sent, and the tests time out waiting for events that never arrive.This PR skips the affected tests in dev mode across
nextjs-16andnextjs-16-streamingtest apps. The tests still run in production mode where routes work reliably.Closes: #20992, #20986, #20987, #20985, #20977, #20976, #20975, #20984