Skip to content

Commit 0849854

Browse files
ci: run extension host tests on Windows in a merge-only job (#16619)
Moves Windows extension host tests into their own merge-only workflow job, and fixes what that turned up on Windows. Fixes #8853. Today the only Windows ext-host coverage is positron-r, run on shard 1 of the Windows e2e job (added in #8816). That step is soft-fail: `continue-on-error`, always `exit 0`. Its Slack alert in `test-merge.yml` reads `needs.e2e-windows-electron.outputs.extensions_failed`, but #11014 renamed that job to `e2e-windows`, so the alert has never fired since. Meanwhile positron-r is failing 4 tests on Windows on `main` (e.g. merge run 38429410345, shard 1: 204 passing, 4 failing). ### Workflow changes - **New `test-ext-host-windows.yml`**, called from `test-merge.yml` and `test-full-suite.yml` (new `run_ext_host_tests_windows` input). It is not called from the PR workflow. It runs the Electron driver via `scripts\test-integration.bat` and fails the job when tests fail. - The web (Chromium) driver is not run: Positron has no web build on Windows. - The Remote driver is not run: Windows remote (WSL) is covered by e2e tests. - Restores the Windows build caches but does not save them; the `e2e-windows` job in the same merge run owns the save. - Sets `VSCODE_SKIP_PRELAUNCH=1` on the test step, as upstream's Windows CI does. Prelaunch already ran, and otherwise the agent host E2E runner calls `spawnSync('npm.cmd')` without `shell: true`, which Node rejects with EINVAL. - **`test-e2e-windows-run.yml`**: removes the positron-r step, its log save/upload steps, and the `extensions_failed` output. Removes the dead `slack-notify-win-extensions` job from `test-merge.yml`. PRs tagged `@:win` no longer run positron-r ext-host tests on Windows; that coverage moves to merge. - Insights `filter_jobs` regex in both callers now matches `ext-host-win`. - `test-full-suite.yml` is now at the 25-input limit for `workflow_dispatch`. ### `scripts/test-integration.bat` - Adds the 13 Positron extension suites that `test-integration.sh` runs, and skips colorize as the `.sh` does (#7349). The Positron suites are skipped when `--suite` is given, since they are not selectable by name. - Resolves `TMP`/`TEMP` to the long path, the same line upstream already has in `test-remote-integration.bat` and `test-web-integration.bat`. On CI `TMP` is `C:\Users\RUNNER~1\...`, and under Node 24.16+ `fs.watch` on an 8.3 short-name path drops every event (nodejs/node#63638; plain Node asserts in libuv `fs-event.c`). - Runs the Positron suites with `--config` pointing at `.vscode-test.js` through a lowercase drive letter. The extension host loads an extension through `c:\`, while vscode-test required the test files through `C:\`. Node keys its module cache by path, so a test importing extension modules got a second, never-initialized copy (confirmed with a probe: both `require.cache` keys present while the extension was active). This is what broke positron-code-cells' context and decoration tests and positron-r's `RSessionManager`. ### Product bugs found (Windows only) - **next-edit-suggestions**: exact-filename keys in `nextEditSuggestions.enabled` (e.g. `"Dockerfile": false`) never matched on Windows, because the basename was taken from `document.fileName` at the last `/` only. It now comes from `path.posix.basename(document.uri.path)`, as `isFileExcludedFromAI` in the same file already does, with a Windows-path test so Linux CI covers it. - **positron-data-driver-duckdb**: on Windows DuckDB reports a lock conflict as a sharing violation (`... File is already open in <process> (PID n)`), so users got the raw error instead of the "another session has it locked" explanation. The pattern now also matches DuckDB's own `File is already open in` text (the OS part of the message is localized). ### Test fixes - **positron-r**: `rootSignature` builds expectations with `path.join` (faking `process.platform` does not change `path`); `session-dispose` stubs `RSessionManager.instance` instead of depending on activation order, which also keeps its fake sessions out of the live manager. - **authentication**: `snowflake` path expectation uses `path.join`. Tests that start the provider catalog watcher remove their temp dir with an async `fs.promises.rm` retry: Windows releases a closed watcher's directory handle on a later event loop turn, and `rmSync`'s own retries block the loop. - **positron-data-driver-odbc**: `resolveUnixConfigPaths` uses `path.posix`. The module takes the platform from an injected host and already uses `path.posix`/`path.win32` explicitly elsewhere; this was the one spot using the host `path`. No change on Unix. - **CSS / HTML language server tests** (upstream files, Positron markers): their entry points globbed `path.posix.join(testRoot, ...)`; on Windows `testRoot` has backslashes, which glob reads as escapes, so both suites ran 0 tests and passed. Now glob relative to `testRoot`, and fail if no test files match. Windows runs the same 9 CSS / 71 HTML tests as Linux. Upstream has the same code. - **positron-data-driver-sqlite / duckdb**: teardowns remove temp dirs with an async retry. `disconnect()` kills the worker process without waiting for it to exit, so the database file is briefly still open, and Windows will not delete an open file. (Making `disconnect()` await worker exit would be the product-side fix; left out of scope here.) ### Unrelated - `configureSnippets.ts`: one-line indent fix from the formatter. The file is unformatted on `main` since #16607, and the pre-commit hook blocked the merge commit that synced this branch with `main`. ### Release Notes #### New Features - N/A #### Bug Fixes - Next Edit Suggestions: per-filename entries in `nextEditSuggestions.enabled` now apply on Windows. - DuckDB data connections: opening a database another session has locked now explains the conflict on Windows too. ### Validation Steps - Locally on Windows, all 13 Positron suites run the way the `.bat` now runs them: 12 pass. positron-r's R-session tests could not start an R kernel from this machine's agent-launched shell (a known local environment issue with Ark's ZeroMQ poller); `main`'s Windows e2e job shows those tests starting R sessions fine on the CI runner. - The originally failing tests were reproduced locally first and fail without the fixes. - Full suite runs on this branch with only `run_ext_host_tests_windows`: - Run 1 (38450231603): failed before any tests, on the agent host E2E `npm.cmd` EINVAL. - Run 2 (38455222586): node.js integration, agent host E2E, and every upstream ext-host suite passed on Windows; stopped at `authentication`. - Run 3 (38466440126): green. Every suite passed, including positron-r (208 passing, with R sessions on the CI runner). CSS/HTML reported 0 tests, which led to the fix above. - Run 4 (38473148320): green on `05908324ee`, now including 9 CSS / 71 HTML server tests. Review follow-ups after it (`7dcca78d53`: empty-glob guard, NES basename, job timeout 150, no `id-token`) were verified locally. - Run 5 (38478932934): green on `7dcca78d53` (the PR head). All 33 sections of `test-integration.bat` ran with no failures; the job took about 1 hour.
1 parent 8cc9d31 commit 0849854

26 files changed

Lines changed: 397 additions & 97 deletions

File tree

‎.github/workflows/test-e2e-windows-run.yml‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ jobs:
108108
# suite. Same secrets the Linux lanes export.
109109
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
110110
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
111-
outputs:
112-
extensions_failed: ${{ steps.extensions.outputs.exit_code != '0' }}
113111
steps:
114112
- uses: actions/checkout@v7
115113
with:
@@ -495,33 +493,6 @@ jobs:
495493
# MaxSessionDuration).
496494
role-duration-seconds: 21600
497495

498-
- name: 🧪 Run Extensions Tests
499-
if: ${{ matrix.shard == 1 }}
500-
id: extensions
501-
continue-on-error: true
502-
shell: bash
503-
run: |
504-
set +e
505-
mkdir -p extensions-tests-logs
506-
npm run test-extension -- -l positron-r 2>&1 | tee extensions-tests-logs/runner.log
507-
EXIT_CODE=${PIPESTATUS[0]}
508-
echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT
509-
exit 0
510-
511-
- name: Save Extensions Tests Logs
512-
if: ${{ matrix.shard == 1 && steps.extensions.outputs.exit_code != '0' }}
513-
shell: bash
514-
run: |
515-
# Save all VSCode integration test logs including output channels
516-
if [ -d ".build/logs/integration-tests" ]; then
517-
echo "Uploading VSCode integration test logs"
518-
mkdir -p extensions-tests-logs
519-
cp -r .build/logs/integration-tests/* extensions-tests-logs/ || true
520-
else
521-
echo "No VSCode logs directory found at .build/logs/integration-tests"
522-
fi
523-
exit 0
524-
525496
- name: Set Report URL
526497
uses: ./.github/actions/gen-report-dir
527498
with:
@@ -592,14 +563,6 @@ jobs:
592563
path: blob-report
593564
retention-days: 1
594565

595-
- name: Upload Extensions Test Logs If Failed
596-
if: ${{ always() && matrix.shard == 1 && steps.extensions.outputs.exit_code != '0' }}
597-
uses: actions/upload-artifact@v7
598-
with:
599-
name: extensions-tests-logs
600-
path: extensions-tests-logs/
601-
if-no-files-found: ignore
602-
603566
- name: Upload Test Logs
604567
if: ${{ always() && inputs.upload_logs }}
605568
uses: actions/upload-artifact@v7
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
name: "Test: Extension Host (Windows)"
2+
3+
# Windows counterpart of test-ext-host.yml. Runs only the Electron ext-host
4+
# driver, through test-integration.bat. The Chromium (web) driver is skipped
5+
# because Positron has no web build on Windows, and the Remote driver because
6+
# Windows remote (WSL) is already covered by e2e tests.
7+
#
8+
# Merge-only by design: test-merge.yml and test-full-suite.yml call this, the
9+
# PR workflow does not. Windows runners are slow to provision and build, and the
10+
# Linux ext-host job already gates PRs.
11+
#
12+
# Restores caches but never saves them: e2e-windows in the same merge run owns
13+
# the Windows cache save (see the note at the top of test-e2e-windows-run.yml).
14+
15+
on:
16+
workflow_call:
17+
inputs:
18+
commit:
19+
description: "Commit SHA to test"
20+
required: false
21+
default: ""
22+
type: string
23+
skip_cache:
24+
description: "Skip restoring caches (use when testing a specific commit)"
25+
required: false
26+
default: false
27+
type: boolean
28+
workflow_dispatch:
29+
30+
permissions:
31+
contents: read
32+
33+
jobs:
34+
ext-host-tests-windows:
35+
name: ext-host-win
36+
runs-on: windows-latest-8x
37+
# Same as test-e2e-windows-run.yml. Leaves room for the npm install retry.
38+
timeout-minutes: 150
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
POSITRON_BUILD_NUMBER: 0 # CI skips building releases
42+
_R_CHECK_FUTURE_FILE_TIMESTAMPS_: false # this check can be flaky in the R pkg tests
43+
_R_CHECK_CRAN_INCOMING_: false
44+
_R_CHECK_SYSTEM_CLOCK_: false
45+
steps:
46+
- uses: actions/checkout@v7
47+
with:
48+
submodules: recursive
49+
50+
- name: Checkout specific commit
51+
if: ${{ inputs.commit != '' }}
52+
run: |
53+
git checkout ${{ inputs.commit }}
54+
git submodule update --init --recursive
55+
56+
- name: Setup Node
57+
uses: actions/[email protected]
58+
with:
59+
node-version-file: .nvmrc
60+
61+
- name: 📦 Restore caches
62+
if: ${{ !inputs.skip_cache }}
63+
id: restore-caches
64+
uses: ./.github/actions/restore-build-caches
65+
66+
# Same toolchain workaround as test-e2e-windows-run.yml: node-gyp does
67+
# not recognize the runner's VS 2026, so give it VS 2022 to fall back
68+
# to. Runs on every run because "Download binaries" below always runs
69+
# `npm rebuild`.
70+
- name: Install Visual Studio 2022 C++ build tools
71+
uses: nick-fields/retry@v4
72+
with:
73+
timeout_minutes: 30
74+
max_attempts: 3
75+
retry_wait_seconds: 15
76+
shell: pwsh
77+
command: |
78+
$ErrorActionPreference = 'Stop'
79+
$bootstrapper = "$env:TEMP\vs_buildtools.exe"
80+
Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vs_buildtools.exe" -OutFile $bootstrapper
81+
$p = Start-Process -FilePath $bootstrapper -Wait -PassThru -ArgumentList @(
82+
'--quiet','--wait','--norestart','--nocache',
83+
'--add','Microsoft.VisualStudio.Workload.VCTools',
84+
'--add','Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre',
85+
'--includeRecommended'
86+
)
87+
if ($p.ExitCode -notin 0,3010) { exit $p.ExitCode }
88+
89+
- name: Install node dependencies
90+
if: steps.restore-caches.outputs.cache-npm-core-hit != 'true' ||
91+
steps.restore-caches.outputs.cache-npm-extensions-volatile-hit != 'true' ||
92+
steps.restore-caches.outputs.cache-npm-extensions-stable-hit != 'true'
93+
uses: nick-fields/retry@v4
94+
env:
95+
npm_config_arch: x64
96+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
97+
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
98+
POSITRON_GITHUB_RO_PAT: ${{ github.token }}
99+
POSITRON_PARALLEL_INSTALL: '0' # Disabled on Windows due to native module file locking races
100+
NPM_CONFIG_AUDIT: 'false'
101+
NPM_CONFIG_FUND: 'false'
102+
NPM_CONFIG_UPDATE_NOTIFIER: 'false'
103+
# Same extension filter logic as test-e2e-windows-run.yml.
104+
POSITRON_EXTENSIONS_FILTER: ${{ (steps.restore-caches.outputs.cache-npm-extensions-volatile-hit == 'true' && steps.restore-caches.outputs.cache-npm-extensions-stable-hit != 'true' && 'stable') || (steps.restore-caches.outputs.cache-npm-extensions-volatile-hit != 'true' && steps.restore-caches.outputs.cache-npm-extensions-stable-hit == 'true' && 'volatile') || '' }}
105+
with:
106+
timeout_minutes: 90
107+
max_attempts: 3
108+
retry_wait_seconds: 5
109+
shell: bash
110+
command: |
111+
set -e
112+
npm --prefix build ci --no-audit --no-fund --fetch-timeout 120000
113+
npm ci --no-audit --no-fund --fetch-timeout 120000
114+
115+
- name: Download binaries (Ark, Kallichore) with retry
116+
uses: nick-fields/retry@v4
117+
env:
118+
POSITRON_GITHUB_RO_PAT: ${{ github.token }}
119+
with:
120+
timeout_minutes: 20
121+
max_attempts: 3
122+
retry_wait_seconds: 10
123+
shell: bash
124+
command: |
125+
set -e
126+
cd extensions/positron-r && npm rebuild --foreground-scripts
127+
cd ../positron-supervisor && npm rebuild --foreground-scripts
128+
129+
- name: Compile Positron and Download Electron
130+
run: npm exec -- npm-run-all --max-old-space-size=8192 -p compile "electron x64"
131+
132+
# Downloads Builtin Extensions (needed for integration testing)
133+
- name: Prelaunch
134+
shell: bash
135+
run: npm run prelaunch
136+
137+
- name: Install rig
138+
shell: pwsh
139+
run: |
140+
winget install --id Posit.rig --accept-source-agreements --accept-package-agreements
141+
142+
# Same R resolution as test-e2e-windows-run.yml, default version only.
143+
# See there for why `rig system add-pak` is called explicitly.
144+
- name: Install R
145+
id: r-versions
146+
shell: pwsh
147+
run: |
148+
$release = (Invoke-RestMethod -Uri 'https://api.r-hub.io/rversions/r-release' -MaximumRetryCount 3 -RetryIntervalSec 5).version
149+
Write-Host "Resolved R release=$release"
150+
"r_version=$release" >> $env:GITHUB_OUTPUT
151+
rig add $release
152+
rig default $release
153+
rig system add-pak
154+
rig ls
155+
156+
# The R package deps come from the e2e test-files DESCRIPTION. One
157+
# ext-host test ("Connections pane works for R") also reads it from the
158+
# repo root.
159+
- name: Stage R DESCRIPTION file
160+
id: download-r-desc
161+
run: |
162+
Copy-Item test/e2e/test-files/DESCRIPTION DESCRIPTION
163+
$hash = (Get-FileHash DESCRIPTION -Algorithm SHA256).Hash
164+
echo "description-hash=$hash" >> $env:GITHUB_OUTPUT
165+
166+
# Same key as the e2e-windows job, which saves it.
167+
- name: Restore R packages cache
168+
continue-on-error: true
169+
uses: actions/cache/restore@v6
170+
with:
171+
path: |
172+
~\AppData\Local\R\cache
173+
C:\Program Files\R\R-${{ steps.r-versions.outputs.r_version }}\library
174+
key: ${{ runner.os }}-r-${{ steps.r-versions.outputs.r_version }}-${{ steps.download-r-desc.outputs.description-hash }}
175+
restore-keys: |
176+
${{ runner.os }}-r-${{ steps.r-versions.outputs.r_version }}-
177+
178+
- name: Install R packages
179+
env:
180+
# Frozen PPM snapshot, same as test-e2e-windows-run.yml.
181+
PPM_REPO: https://packagemanager.posit.co/cran/2026-06-30
182+
run: |
183+
Rscript -e "options(repos = c(CRAN = Sys.getenv('PPM_REPO'))); pak::local_install_dev_deps(ask = FALSE, upgrade = FALSE)"
184+
185+
- name: 🧪 Run Extension Host Tests (Electron)
186+
id: electron-integration-tests
187+
shell: cmd
188+
env:
189+
# Prelaunch already ran above. Skipping it here also avoids the
190+
# agent host E2E runner's `spawnSync('npm.cmd')`, which Node rejects
191+
# with EINVAL on Windows (no `shell: true`). Upstream's Windows CI
192+
# sets this the same way.
193+
VSCODE_SKIP_PRELAUNCH: '1'
194+
run: scripts\test-integration.bat
195+
196+
- name: Upload extension host logs
197+
if: ${{ failure() }}
198+
uses: actions/upload-artifact@v7
199+
with:
200+
name: ext-host-win-logs
201+
path: |
202+
.build/logs
203+
.build/crashes
204+
if-no-files-found: ignore
205+
retention-days: 7

‎.github/workflows/test-full-suite.yml‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ on:
104104
required: false
105105
default: true
106106
type: boolean
107+
run_ext_host_tests_windows:
108+
description: "Extension Host Tests (Windows)"
109+
required: false
110+
default: true
111+
type: boolean
107112
commit:
108113
description: "Commit SHA to test:"
109114
required: false
@@ -519,10 +524,20 @@ jobs:
519524
commit: ${{ inputs.commit != 'latest' && inputs.commit || '' }}
520525
pull_request: false
521526

527+
ext-host-tests-windows:
528+
name: test
529+
needs: [validate-commit]
530+
if: ${{ !failure() && !cancelled() && (github.event_name == 'schedule' || inputs.run_ext_host_tests_windows) }}
531+
uses: ./.github/workflows/test-ext-host-windows.yml
532+
secrets: inherit
533+
with:
534+
commit: ${{ inputs.commit != 'latest' && inputs.commit || '' }}
535+
skip_cache: ${{ inputs.commit != 'latest' }}
536+
522537
slack-notify:
523538
if: always()
524539
needs:
525-
[validate-commit, e2e-electron, e2e-windows, e2e-macos-arm64, e2e-macos-x64, e2e-chromium, e2e-chromium-rocky, e2e-chromium-suse, e2e-chromium-sles, e2e-chromium-debian, e2e-workbench, e2e-workbench-stable, e2e-workbench-rocky, e2e-workbench-suse, e2e-pyrefly, e2e-connect, e2e-jupyter, e2e-remote-ssh, unit-tests, ext-host-tests]
540+
[validate-commit, e2e-electron, e2e-windows, e2e-macos-arm64, e2e-macos-x64, e2e-chromium, e2e-chromium-rocky, e2e-chromium-suse, e2e-chromium-sles, e2e-chromium-debian, e2e-workbench, e2e-workbench-stable, e2e-workbench-rocky, e2e-workbench-suse, e2e-pyrefly, e2e-connect, e2e-jupyter, e2e-remote-ssh, unit-tests, ext-host-tests, ext-host-tests-windows]
526541
runs-on: ubuntu-latest
527542
steps:
528543
- name: Checkout
@@ -539,5 +554,5 @@ jobs:
539554
connect_api_key: ${{ secrets.CONNECT_API_KEY }}
540555
repo_id: "positron"
541556
title: "E2E Full Suite Tests"
542-
filter_jobs: "(e2e / ([^0-9]*)|unit|ext-host)$"
557+
filter_jobs: "(e2e / ([^0-9]*)|unit|ext-host(-win)?)$"
543558
notify_on: ${{ inputs.notify_on }}

‎.github/workflows/test-merge.yml‎

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,19 @@ jobs:
7575
with:
7676
pull_request: false
7777

78+
ext-host-tests-windows:
79+
name: test
80+
uses: ./.github/workflows/test-ext-host-windows.yml
81+
secrets: inherit
82+
7883
slack-notify:
7984
if: always()
8085
needs:
8186
[
8287
setup,
8388
unit-tests,
8489
ext-host-tests,
90+
ext-host-tests-windows,
8591
e2e-electron,
8692
e2e-windows,
8793
e2e-ubuntu-chromium,
@@ -101,22 +107,7 @@ jobs:
101107
webhook_secret: ${{ secrets.E2E_INSIGHTS_WEBHOOK_SECRET }}
102108
connect_api_key: ${{ secrets.CONNECT_API_KEY }}
103109
repo_id: "positron"
104-
filter_jobs: "(e2e / ([^0-9]*)|unit|ext-host)$"
105-
106-
slack-notify-win-extensions:
107-
if: ${{ needs.e2e-windows-electron.outputs.extensions_failed == 'true' }}
108-
needs:
109-
- e2e-windows
110-
runs-on: ubuntu-latest
111-
steps:
112-
- name: Notify Slack
113-
uses: midleman/[email protected]
114-
with:
115-
gh_repo_token: ${{ secrets.GITHUB_TOKEN }}
116-
slack_token: ${{ secrets.SLACK_TOKEN_TEST_STATUS }}
117-
slack_channel: "#positron-rstats-test-results"
118-
filter_jobs: "windows"
119-
notify_on: "always"
110+
filter_jobs: "(e2e / ([^0-9]*)|unit|ext-host(-win)?)$"
120111

121112
analyze-e2e-failures:
122113
if: ${{ always() && contains(needs.*.result, 'failure') }}

‎extensions/authentication/src/test/activationOrdering.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import * as path from 'path';
1010
import * as vscode from 'vscode';
1111
import { migrateSettingsAndPrimeCatalog } from '../extension';
1212
import { getCachedProvider } from '../providerCatalog';
13+
import { removeTempDir } from './tempDir';
1314

1415
/** Minimal ExtensionContext stub: only `subscriptions` is read by initProviderCatalog. */
1516
function fakeContext(): vscode.ExtensionContext {
@@ -45,7 +46,7 @@ suite('activation ordering', () => {
4546
for (const d of context.subscriptions) {
4647
d.dispose();
4748
}
48-
fs.rmSync(dir, { recursive: true, force: true });
49+
await removeTempDir(dir);
4950
await vscode.workspace.getConfiguration('authentication.aws')
5051
.update('credentials', undefined, vscode.ConfigurationTarget.Global);
5152
await vscode.workspace.getConfiguration('authentication.snowflake')

‎extensions/authentication/src/test/customProviders.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
} from '../customProviderAuth';
3636
import { CustomProviderRegistry } from '../customProviderRegistry';
3737
import { customProviderSource, getRegistrableCustomProviders } from '../providerSources';
38+
import { removeTempDir } from './tempDir';
3839

3940
/** The model sources Positron registers for the catalog's custom entries. */
4041
function customSources() {
@@ -123,11 +124,11 @@ suite('custom providers', () => {
123124
context = fakeContext();
124125
});
125126

126-
teardown(() => {
127+
teardown(async () => {
127128
for (const d of context.subscriptions) {
128129
d.dispose();
129130
}
130-
fs.rmSync(dir, { recursive: true, force: true });
131+
await removeTempDir(dir);
131132
});
132133

133134
suite('write path', () => {

0 commit comments

Comments
 (0)