Skip to content

test: stop tests that pass alone from timing out in a loaded full run - #1177

Merged
jonkwheeler merged 3 commits into
tsrx-org:mainfrom
jonkwheeler:fix/test-timeouts-under-load
Nov 12, 2026
Merged

jonkwheeler merged 3 commits into
tsrx-org:mainfrom
jonkwheeler:fix/test-timeouts-under-load

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A full pnpm test on a busy machine no longer fails tests that pass alone just because they run slowly. Each limit is still there to catch a hang. These tests check results, not speed.

Tests Before After
content-mapper, typescript-plugin, language-server projects (spawn tsc, tsrx-tsc or a language server) 5s default 60s project testTimeout, the limit these packages already use for their slowest tests. Files that set their own limit keep it.
tsrx-vue type-only-types.test.js (a TypeScript program per case) 5s default 30s, as the tsrx-utils *-types suites have
vite-plugin-react react-aria / react-query / react-router typecheck fixtures 30s (react-aria took 28.9s alone under load) 120s
website-tsrx/tests/shiki-codemirror.test.ts vi.waitFor 1s default 20s wait, 30s test

language-server/tests/typescriptDiscoveryLsp.test.js failed differently: Timed out waiting for notification window/showMessage. Each session gave every startup warning 5s, counted from before the server process started. A raised timeout alone would have made each "no warning" case wait the whole limit. The server sends these warnings while it handles initialized, so they reach the client before the answer to any later request. The session now records every warning, sends a textDocument/documentSymbol request after opening the file, and the tests check the recorded warnings once it answers. The only limit left is the recorder's own, as long as the 60s test timeout, and a session fails if the recorder stops before the server answers, so a "no warning" case cannot pass without checking. The tests take about 6s instead of about 22s.

Out of scope, as the issue notes: vscode-plugin/tests/grammar.test.js under load fails inside Shiki's per-line tokenize time limit, not on a test timeout.

Test-only change, so there is no changeset.

Verification

  • npx vitest run --project website --project tsrx-vue --project content-mapper --project typescript-plugin --project language-server --project vite-plugin-react: 57 files, 1542 passed, 15 skipped
  • typescriptDiscoveryLsp.test.js, 4 copies at once: 6/6 passed in each
  • Full npx vitest run at load average 60 to 90: 176 files, 10009 passed, 82 skipped, 0 failed. For comparison, a full run of a branch off main without these changes, at load average about 160, failed 19 tests: every one was a timeout listed in the table above, plus the vscode-plugin grammar test that hits Shiki's tokenize limit.
  • pnpm typecheck: clean
  • npx prettier --check on the changed files: clean

Related

Fixes #1157
Related: #310, #1106

🤖 Generated with Claude Code


Note

Low Risk
Test-only timeout and assertion changes; no production code paths affected.

Overview
Raises Vitest timeouts for slow, worker-contended suites so a full pnpm test does not flake on tests that still pass in isolation. typescript-plugin, content-mapper, and language-server projects get a shared 60s testTimeout; tsrx-vue type-only-types gets 30s; vite-plugin-react react-aria/query/router fixture typechecks go from 30s to 120s per case; shiki-codemirror uses a 20s vi.waitFor and 30s test timeout.

typescriptDiscoveryLsp.test.js is refactored so startup window/showMessage warnings are collected by a non-matching listener, then asserted after a post-initialized textDocument/documentSymbol request—avoiding per-warning 5s waits and “no second warning” timeout races—while still using the 60s hook/test config.

Reviewed by Cursor Bugbot for commit 2a18db8. Bugbot is set up for automated code reviews on this repo. Configure here.

jonkwheeler and others added 2 commits October 27, 2026 11:48
A full parallel run on a busy machine failed tests that pass alone and
assert results, not speed:

- content-mapper, typescript-plugin and language-server spawn `tsc`,
  `tsrx-tsc` or a language server and used the 5s default. They now get
  60s, the limit those packages already set on their slowest tests.
- The Vue type-only checks build a TypeScript program per case. They get
  30s, as the tsrx-utils `*-types` suites do.
- The React typecheck fixtures took up to 28.9s alone against 30s. They
  get 120s.
- The Shiki CodeMirror test waited 1s, the `vi.waitFor` default, for
  highlighting that loads asynchronously. It now waits up to 20s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…timing window

Each session waited 5s, counted from before the server started, for each
startup warning. Under load a warning could arrive later and fail the
test, and every case that expects no warning spent 5s waiting for the
wait to time out.

The server sends its warnings while it handles `initialized`, so they
reach the client before the answer to a request sent after it. Record
every warning, send a document symbol request after opening the file,
and assert on the recorded warnings once it answers. Its tests now take
about 6s instead of about 22s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 using default effort 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 4ca2a92. Configure here.

…t runs

The warning recorder used wait_for_notification's 30s default timeout,
which removes the listener when it expires. Under a 60s test limit, a
session whose document symbol answer came after 30s lost its warnings:
the warning cases failed and the no-warning cases passed without
checking anything. The recorder now times out with the test, and the
session fails if it stopped recording before the server answered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jonkwheeler
jonkwheeler marked this pull request as ready for review October 27, 2026 16:44
jonkwheeler added a commit to jonkwheeler/tsrx that referenced this pull request Nov 6, 2026
At the end of `type-only-types.test.js` it conflicted with tsrx-org#1177, which changes
the lines before it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jonkwheeler
jonkwheeler merged commit 1644867 into tsrx-org:main Nov 12, 2026
8 checks passed
jonkwheeler added a commit that referenced this pull request Nov 12, 2026
…pins (#1296)

* fix(vue): leave Vue's slot flag out of the type-only @pending boundary

`vue-jsx-vapor` 3.2.29 types a component's `v-slots` from its real slots, so
the `_` flag on `Suspense` is an excess property and every `@try` with
`@pending` reports TS2322 in the editor. The flag only matters at runtime, so
keep it in compiled output and drop it from the type-only print.

* chore(vue): bump vue to 3.6.0-rc.14 and vue-jsx-vapor to 3.2.29

Moves every dev pin, and adds `vue-jsx-vapor` as a dev dependency of
`@tsrx/vue` so its peer stops resolving to 3.2.14 in the lockfile.

Runs the Vue runtime tests on the real `vue-jsx-vapor` runtime instead of a
hand-copied shim. The shim had the #870 bug and lacked `normalizeVaporSlots`,
which the new compiler output imports, so it would have hidden the fix.

* test(vue): run the worker regression in a worker-like scope

The test matched text: it looked only at the first mention of
`__VUE_HMR_RUNTIME__` and rejected only uses at column 0, so an indented,
unguarded `createRecord` after one guarded use passed. It now runs the served
module with `self` and none of Vue's globals, and checks what it posted.

* test(vue): pin the Suspense slot flag in compiled output

Nothing failed when `_: 1` was dropped from compiled output. Pin it there and
pin its absence from type-only output, for both ways `@pending` is lowered.

Correct the changeset and 4a43094's message: `vue-jsx-vapor` rejects the flag
from 3.2.20, not 3.2.29, and leaving it out clears the error from 3.2.22.
4a43094's "the flag only matters at runtime" is also unsupported: removing it
fails no runtime test, and I haven't shown what depends on it.

* chore(vue): drop an unused paths entry from the plugin test tsconfig

Nothing in the project imports Vue's Vapor browser build. Only
`vue-runtime-shim.js` does, and that file isn't part of the project. `tsc`
reports the same with and without the entry.

* test(vue): move the Suspense slot flag test to its own file

At the end of `type-only-types.test.js` it conflicted with #1177, which changes
the lines before it.

* test(vue): stop the slot flag test passing on missing output

The type-only assertion was only a negative match, so it also passed if the
`Suspense` boundary was gone. Require the boundary, and no compile errors,
before checking that the flag is absent.

* test(vue): let the slot flag test accept a private Suspense name

#1175 and #1222 import `Suspense` as `__Suspense`, so the test failed once
either was merged with this branch. The name isn't what it's about.

* style(vue): format the slot flag test

* fix(vue): require vue 3.6 and vue-jsx-vapor 3.2.27 as peers

Raise the floors in all five packages that declare them: `@tsrx/vue`,
`@tsrx/vue-runtime`, `@tsrx/vite-plugin-vue`, `@tsrx/rspack-plugin-vue` and
`@tsrx/bun-plugin-vue`.

`vue >=3.6.0-0` admits the 3.6 prereleases and rejects 3.5, which has no
Vapor. The old `>=3.5` rejected every 3.6 prerelease under npm, so no Vapor
setup installed with npm's defaults. `vue-jsx-vapor` 3.2.27 is the first
release with the fixes for both #186 (3.2.26) and #870 (3.2.27).

Minor, because a project on `vue-jsx-vapor` 3.2.26 that installs today under
pnpm's `strict-peer-dependencies` fails after this.

* docs(vue): name Vue 3.6 in the install commands

`vue` alone installs Vue's `latest`, 3.5.45, which has no Vapor: with pnpm,
`vite build` then fails with MISSING_EXPORT. Name `vue@^3.6.0-0`, which picks
the newest 3.6 prerelease now and stable 3.6 once it ships.

* docs(changeset): drop the 3.2.20 to 3.2.22 notes from the slot flag changeset

With `vue-jsx-vapor` 3.2.27 as the floor, every supported version rejects the
flag, and every one accepts the output without it.

* docs(changeset): say which Vue prereleases the new floor admits

`>=3.6.0-0` admits 3.6.0's prereleases, not later ones such as 3.6.1-alpha.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

[Bug]: Several tests time out during a full parallel test run (shiki-codemirror, tsc and LSP tests, react typecheck fixtures)

1 participant