ci(wsl): retry flaky lib tests in the WSL2 nightly

The 9P share sometimes aborts a write mid-test with os error 995
(ERROR_OPERATION_ABORTED): a Claude Desktop config test passed in 1.3s
on one run and failed after 17s on the next with no code change.

Retry up to twice in the nightly only. The ci profile used by PRs keeps
failing on the first error, and nextest still lists retried passes as
FLAKY so repeat offenders stay visible.
This commit is contained in:
Jason committed 2026-10-08 11:25:51 +08:00
1 parent 7d8004c408
commit 5ae6ad3888
1 file changed
+3 -1
+3 -1
View File
@@ -113,9 +113,11 @@ jobs:
$env:TMP = $env:CC_SWITCH_WSL_TEST_TEMP
cargo nextest run --archive-file $env:NEXTEST_ARCHIVE --extract-to $env:NEXTEST_EXTRACT_DIR --extract-overwrite --profile ci --no-tests fail --no-capture --run-ignored only -E 'test(=config::tests::atomic_write_replaces_existing_wsl_unc_file)'
# The 9P share sometimes aborts a write mid-test (os error 995). Retry here
# only, not in the ci profile; nextest still reports such tests as FLAKY.
- name: Run lib tests against WSL2-backed home
shell: pwsh
run: |
$env:TEMP = $env:CC_SWITCH_WSL_TEST_TEMP
$env:TMP = $env:CC_SWITCH_WSL_TEST_TEMP
cargo nextest run --archive-file $env:NEXTEST_ARCHIVE --extract-to $env:NEXTEST_EXTRACT_DIR --extract-overwrite --profile ci --test-threads 1 -E 'not test(/database::/)'
cargo nextest run --archive-file $env:NEXTEST_ARCHIVE --extract-to $env:NEXTEST_EXTRACT_DIR --extract-overwrite --profile ci --test-threads 1 --retries 2 -E 'not test(/database::/)'