Repository navigation
test: keep cleaning up the Interactive suite after one resource fails - #1959
Conversation
renkun-ken
left a comment
There was a problem hiding this comment.
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.
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
TestResourceshelper 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 withPromise.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.