Skip to content

test(trae): give the shared-file case a budget the loaded runner has time for - #2108

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
Luckyou-d:test/give-the-trae-case-a-budget
Nov 27, 2026
Merged

jeff-r2026 merged 1 commit into
Tencent:mainfrom
Luckyou-d:test/give-the-trae-case-a-budget

Conversation

@Luckyou-d

Copy link
Copy Markdown
Contributor

The Windows CI job (vitest.windows.config.ts) runs every file in its list in parallel, and trae.test.ts's shared-file case writes and re-reads both editions' skills trees while that happens. It passes alone in well under a second:

$ npx vitest run src/__tests__/trae.test.ts
Test Files  1 passed (1)
     Tests  11 passed (11)

and in the suite it hits the 15 s default:

FAIL  src/__tests__/trae.test.ts > Trae support > keeps a tools-filtered server in the
      shared file while either edition targets it
Error: Test timed out in 15000ms.

That single timeout is the only thing standing between the job and a green run here, and the case itself is not slow - the machine it shares with 52 other files is.

Change

An explicit budget on the case, as the fleet-fence tests already do:

it('keeps a tools-filtered server in the shared file while either edition targets it', { timeout: 120_000 }, async () => {

Test-side only; no behaviour changes. If the maintainers would rather shrink the case (it does a lot of filesystem setup) than raise the limit, that is a fine alternative - say so and I will rework it instead.

Verification

  • npx vitest run --config vitest.windows.config.ts -> 5648 passed, 1 failed, 5 skipped, twice in a row; before the change it was 5646 passed, 3 failed with this case timing out each run.
  • The one remaining failure is fleet-fence.test.ts, which is the subject of test: give the two slow Windows cases a budget their work needs #2016 and red on main here for the same reason (a 15 s budget on a case that does more work than 15 s of a loaded runner allows).
  • oxlint --type-aware --deny-warnings src/__tests__/trae.test.ts clean.

…time for

The Windows job runs the whole file list in parallel, and this case writes and
re-reads both editions' skills trees while that happens. It passes alone in
under a second and timed out at 15 s in the suite, taking 5646 -> 5647 passing
cases with it. The budget is the test's, not the code's.

@jeff-r2026 jeff-r2026 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified on Linux (Node 20), stacked on main da482cb together with the other PRs merged in this pass: typecheck, build, lint, the targeted unit suites and the affected E2E files pass. The only failing CI jobs are the two fork-safe E2E jobs that fail on main itself (fixed in #2114).

@jeff-r2026
jeff-r2026 merged commit 667d231 into Tencent:main Nov 27, 2026
15 of 16 checks passed
@Luckyou-d

Copy link
Copy Markdown
Contributor Author

Merged - thanks @jeff-r2026.

For the record on why it was worth the budget rather than a rewrite: the case passes alone in under a second and only timed out under the full parallel Windows run, so the work it does is fine and the 15 s default was the wrong ceiling for it. The remaining failure in that job is fleet-fence.test.ts, which #2016 covers the same way.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants