Skip to content

test(nextjs): Skip flaky tests affected by Turbopack 404s in dev mode#20993

Merged
andreiborza merged 5 commits into
developfrom
ab/unflake-nextjs-16-dev-mode
May 19, 2026
Merged

test(nextjs): Skip flaky tests affected by Turbopack 404s in dev mode#20993
andreiborza merged 5 commits into
developfrom
ab/unflake-nextjs-16-dev-mode

Conversation

@andreiborza
Copy link
Copy Markdown
Member

@andreiborza andreiborza commented May 19, 2026

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-16 and nextjs-16-streaming test apps. The tests still run in production mode where routes work reliably.

Closes: #20992, #20986, #20987, #20985, #20977, #20976, #20975, #20984

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
@andreiborza andreiborza requested a review from a team May 19, 2026 05:38
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.
@andreiborza andreiborza changed the title chore(nextjs): Skip flaky server-components test in dev mode chore(nextjs): Skip flaky tests affected by Turbopack 404s in dev mode May 19, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread dev-packages/e2e-tests/test-applications/nextjs-16/tests/route-handler.test.ts Outdated
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.
@andreiborza andreiborza force-pushed the ab/unflake-nextjs-16-dev-mode branch from b787999 to c7bd25e Compare May 19, 2026 07:26
@mydea mydea changed the title chore(nextjs): Skip flaky tests affected by Turbopack 404s in dev mode test(nextjs): Skip flaky tests affected by Turbopack 404s in dev mode May 19, 2026
@andreiborza andreiborza merged commit 4ebf47d into develop May 19, 2026
48 checks passed
@andreiborza andreiborza deleted the ab/unflake-nextjs-16-dev-mode branch May 19, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants