Skip to content

test: keep cleaning up the Interactive suite after one resource fails - #1959

Merged
eitsupi merged 2 commits into
mainfrom
test/interactive-suite-cleanup
Nov 17, 2026
Merged

eitsupi merged 2 commits into
mainfrom
test/interactive-suite-cleanup

Conversation

@eitsupi

@eitsupi eitsupi commented Nov 17, 2026

Copy link
Copy Markdown
Member

The Interactive editor suite shares R sessions, language servers, tabs, and temporary directories across its tests and releases them in one suiteTeardown. That teardown awaited each step in turn, so a single failure (for example one language client failing to stop) skipped every later step: tabs stayed open, other servers kept running, and directories were not removed. A setup that failed partway left the same state behind.

A small TestResources helper now owns this cleanup. The suite registers each resource as soon as it acquires it, and the teardown releases them in the same order as before. Steps in one phase run with Promise.allSettled, and later phases still run after a failure. Each release has a time limit, so a stuck release is reported instead of blocking the rest. The teardown then fails with every cleanup error, labelled by phase and resource. The bulk session suite uses the same helper. Test cases and their assertions are unchanged.

@eitsupi
eitsupi marked this pull request as ready for review November 17, 2026 15:39

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed at 8867ea3. No blocking findings.

The cleanup registrations cover partially acquired fixtures, preserve the previous dependency order, and allow sibling resources and later phases to run after a release fails. The additional stopping-client waits account for clients removed from the service map during tab closure, and batching tab closure avoids concurrent tab-group edits.

Validation: local build, TypeScript compilation and lint passed; both new TestResources tests passed; eight focused VS Code integration tests passed on macOS with arf 0.7.2-rc.1 (native execution, all four bulk-session tests, and the three language-client shutdown tests). The suite's failed-setup path also completed teardown without an additional cleanup error.

Hosted build, format, lint, typecheck, Ubuntu Node and Windows Node checks have passed. macOS Node and the three platform extension jobs are still running; the full extension suite was not run locally.

@eitsupi
eitsupi merged commit 25fc9a6 into main Nov 17, 2026
9 of 10 checks passed
@eitsupi
eitsupi deleted the test/interactive-suite-cleanup branch November 17, 2026 15:57
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