Repository navigation
test(signals): make two timing-sensitive tests robust on loaded CI runners - #4516
Conversation
Every test in treeshake.test.ts runs a full Vite build of a fixture. The first one pays the bundler's cold start, and under the whole suite's load on CI it has run past vitest's 5 s default (5,295 ms on #4510, and on other PRs earlier today) without any assertion failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
|
Size (brotli, eager entry chunk)
|
"measures self-time and aggregates costs by scope and root write" ranks a 10 ms memo above a cheap effect by wall-clock self-time. On this PR's CI run a scheduling pause inside the effect measured 17.9 ms against the memo's 10.1 ms. A 40 ms spin keeps the ranking meaningful under load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
Coverage Report for CI Build 41144279741Coverage remained the same at 78.108%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Merging this PR will improve performance by 5.28%2 warnings
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
Before: two signals tests sometimes fail on CI under full-suite load, without any real regression behind them:
tests/treeshake.test.ts› "core floor sheds every optional feature module" hits vitest's 5 s default timeout (5,295 ms on fix(signals): a memo waiting on a held flight is the hold's work at its landing (#4408, #4399) #4510, and on other PRs earlier today). Each test in that file runs a full Vite build, and the first one also pays the bundler's cold start.tests/attribution.test.ts› "measures self-time and aggregates costs by scope and root write" ranks a memo that spins for 10 ms above a cheap effect by wall-clock self-time. On this PR's first CI run, a scheduling pause inside the effect measured 17.9 ms against the memo's 10.1 ms (expected 17.94 to be less than 10.11).After: the tree-shaking suite has a 30 s timeout, and the attribution memo spins for 40 ms. Both tests still assert the same things, but a slow runner no longer turns them red.
How:
describe(name, { timeout: 30_000 }, fn)for the tree-shaking suite, andspin(40)for the attribution memo, each with a comment explaining why. Locally both files pass (treeshake 15/15, attribution 32/32). These are test-only changes: no changeset, no size change.🤖 Generated with Claude Code
https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2