Skip to content

test: keep timing-sensitive browser cleanup synchronous - #345351

Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
mainfrom
agents/ci-regression-fix-test-cleanup
Oct 31, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 1 commit into
mainfrom
agents/ci-regression-fix-test-cleanup

Conversation

@dmitrivMS

Copy link
Copy Markdown
Collaborator

Fixes the two CI regressions from #345312 described in the investigation, without reverting the rest of the cleanup.

  • Run the pet test's registered cleanup synchronously in finally, so its widget is disposed and fake clock restored before ResizeObserver can queue fake animation frames between the test body and teardown. This prevents the shared DOM animation-frame scheduler from becoming stranded.
  • Dispose the intentionally failing list and remove its DOM synchronously in finally, before a queued frame can render the throwing element again during teardown.
  • Preserve the assertions and suite leak checking. Add brief comments explaining the cleanup timing. No production code or dependency manifests change.

Validation

Run on Windows with Node 24.22.1. Both reported failures reproduced on the unchanged branch before applying the fix.

Electron regression sequence: before: 2 passing, 2 animation timeouts; after: 4 passing in each of 3 runs.

.\scripts\test.bat --run src\vs\workbench\contrib\chat\test\browser\widget\chatPetWidget.test.ts --grep "on-the-run|moves one pet|falls directly|preserves the visible departure" --reporter spec

Chromium regression sequence: before: 2 passing plus an afterEach failure, done() called multiple times ... render failed; after: 2 passing, no hook error.

npm run test-browser-no-install -- --browser chromium --run src\vs\base\test\browser\ui\list\listView.test.ts --grep "render error|reentrant splice" --reporter spec --stall-timeout 60

Full ListView suite in Chromium: 27 passing in each of 3 runs.

npm run test-browser-no-install -- --browser chromium --run src\vs\base\test\browser\ui\list\listView.test.ts --reporter dot --stall-timeout 60

Additional checks:

  • npm run build-fast -- --client-only - passed (client transpilation).
  • npm run eslint -- src\vs\base\test\browser\ui\list\listView.test.ts src\vs\workbench\contrib\chat\test\browser\widget\chatPetWidget.test.ts - passed.
  • git diff --check - passed.

Full CI, standalone TypeScript type checking, the full ChatPetWidget suite, and macOS/Linux runs were not run locally.

Fix the two CI regressions from #345312 without reverting the suite-store cleanup. Dispose the pet fixture and restore its fake clock before layout observers run, and dispose the intentionally failing list before its queued rerender.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 11:06

Copilot AI 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.

🟢 Approval recommended

There are no active review issues for the synchronous cleanup changes in the two browser tests.

No open issues 🎉

What changed in this PR

Restores synchronous cleanup in two timing-sensitive browser tests to address regressions from #345312, while preserving assertions and suite leak checking. No production code or dependencies change.

Changes:

  • Dispose the chat pet widget and restore its fake clock in finally, before browser callbacks can schedule fake animation frames.
  • Dispose the intentionally failing list and remove its DOM in finally, preventing queued frames from rendering the throwing element again.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatPetWidget.test.ts Runs registered cleanup synchronously and explains the timing requirement.
src/​vs/​base/​test/​browser/​ui/​list/​listView.test.ts Moves list disposal and DOM removal into synchronous finally cleanup.

Review effort: Balanced

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) marked this pull request as ready for review October 31, 2026 11:29
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 11ba54a into main Oct 31, 2026
56 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the agents/ci-regression-fix-test-cleanup branch October 31, 2026 13:24
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Oct 31, 2026
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.

3 participants