Skip to content

Turbopack: Fix flake in task_statistics unit test#89981

Merged
bgw merged 1 commit intocanaryfrom
bgw/fix-task-statistics-flake
Feb 13, 2026
Merged

Turbopack: Fix flake in task_statistics unit test#89981
bgw merged 1 commit intocanaryfrom
bgw/fix-task-statistics-flake

Conversation

@bgw
Copy link
Member

@bgw bgw commented Feb 13, 2026

If we don't explicitly return a Vc::cell(()) here, then <() as dyn turbo_tasks::vc::default::ValueDefault>::value_default gets called in a non-deterministic way.

That's not something we care about testing here, so just add a an explicit Vc::cell(()) call to avoid it.

@nextjs-bot nextjs-bot added created-by: Turbopack team PRs by the Turbopack team. Turbopack Related to Turbopack with Next.js. labels Feb 13, 2026
Copy link
Member Author

bgw commented Feb 13, 2026

@bgw bgw requested a review from a team February 13, 2026 21:42
@bgw bgw marked this pull request as ready for review February 13, 2026 21:42
@bgw
Copy link
Member Author

bgw commented Feb 13, 2026

I'll merge bypassing requirements once https://github.com/vercel/next.js/actions/runs/22003821408/job/63583074340?pr=89981 passes

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Feb 13, 2026

Failing test suites

Commit: b2223f8 | About building and testing Next.js

pnpm test-start-turbo test/e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts (turbopack) (job)

  • segment cache (revalidation) > delay re-prefetch after revalidation to allow CDN propagation (DD)
Expand output

● segment cache (revalidation) › delay re-prefetch after revalidation to allow CDN propagation

page.waitForSelector: Timeout 5000ms exceeded.
Call log:
  - waiting for locator('#greeting') to be visible

  519 |
  520 |     return this.startChain(async () => {
> 521 |       const el = await page.waitForSelector(selector, {
      |                             ^
  522 |         timeout,
  523 |         state,
  524 |       })

  at waitForSelector (lib/browsers/playwright.ts:521:29)
  at Playwright._chain (lib/browsers/playwright.ts:651:23)
  at Playwright._chain [as startChain] (lib/browsers/playwright.ts:632:17)
  at Playwright.startChain [as waitForElementByCss] (lib/browsers/playwright.ts:520:17)
  at Playwright.waitForElementByCss [as elementByCss] (lib/browsers/playwright.ts:405:17)
  at Playwright.elementByCss [as elementById] (lib/browsers/playwright.ts:425:17)
  at elementById (e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts:371:38)
  at act (lib/router-act.ts:296:27)
  at Object.<anonymous> (e2e/app-dir/segment-cache/revalidation/segment-cache-revalidation.test.ts:366:5)

pnpm test-dev-turbo test/e2e/app-dir/actions/app-action.test.ts (turbopack) (job)

Expand output

● Test suite failed to run

Jest encountered an unexpected token

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

By default "node_modules" folder is ignored by transformers.

Here's what you can do:
 • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
 • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
 • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
 • If you need a custom transformation specify a "transform" option in your config.
 • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/configuration
For information about custom transformations, see:
https://jestjs.io/docs/code-transformation

Details:

/root/actions-runner/_work/next.js/next.js/test/e2e/app-dir/actions/app-action.test.ts:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { FileRef, nextTestSetup } from 'e2e-utils';
                                                                                  ^^^^^^

SyntaxError: Cannot use import statement outside a module

  at Runtime.createScriptFromCode (../node_modules/.pnpm/jest-runtime@29.7.0/node_modules/jest-runtime/build/index.js:1505:14)

@bgw bgw merged commit 6df0b7b into canary Feb 13, 2026
161 of 169 checks passed
@bgw bgw deleted the bgw/fix-task-statistics-flake branch February 13, 2026 21:57
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 13, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing bgw/fix-task-statistics-flake (b2223f8) with canary (a7f5106)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by: Turbopack team PRs by the Turbopack team. Turbopack Related to Turbopack with Next.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments