The zone lookup tests fail on Windows because they delete their SQLite file while a pooled connection holds it #444

Closed
opened 2026-11-14 03:18:17 -05:00 by claude · 1 comment
Owner

Run 1637 (push to develop, merge of #443, commit 1cbc8813) failed in Test .NET on Windows: all 10 tests of AuthoritativeZoneCacheFindZoneTests (added by #230) fail in DisposeAsync with

System.IO.IOException : The process cannot access the file '...\ninlil-dns-findzone-tests-<guid>.sqlite3' because it is being used by another process.

The class deletes the database file with File.Delete. A pooled SQLite connection keeps the file open, which Windows refuses to delete. The shared helper TemporaryFiles.DeleteSqliteDatabase clears that database's pool first; the sibling AuthoritativeZoneCacheDelegationTests uses it.

Fix: use the helper. Test-only.

To check afterwards: why the pull-request pipeline of #443 reported Test .NET on Windows green for the same tests.

Run 1637 (push to `develop`, merge of #443, commit 1cbc8813) failed in **Test .NET on Windows**: all 10 tests of `AuthoritativeZoneCacheFindZoneTests` (added by #230) fail in `DisposeAsync` with ``` System.IO.IOException : The process cannot access the file '...\ninlil-dns-findzone-tests-<guid>.sqlite3' because it is being used by another process. ``` The class deletes the database file with `File.Delete`. A pooled SQLite connection keeps the file open, which Windows refuses to delete. The shared helper `TemporaryFiles.DeleteSqliteDatabase` clears that database's pool first; the sibling `AuthoritativeZoneCacheDelegationTests` uses it. Fix: use the helper. Test-only. To check afterwards: why the pull-request pipeline of #443 reported **Test .NET on Windows** green for the same tests.
Author
Owner

Answer to the open question: the pull-request pipeline does not run the Windows tests at all. test-windows in .forgejo/workflows/pipeline.yml has if: inputs.kind == 'prerelease' && (forgejo.ref_name == 'develop' || forgejo.ref_name == 'main'), so on a pull request the job is skipped and its status reads as passed. That is by design (one Windows runner). A Windows-only test failure therefore shows first on the develop push run after the merge, as it did here.

Answer to the open question: the pull-request pipeline does not run the Windows tests at all. `test-windows` in `.forgejo/workflows/pipeline.yml` has `if: inputs.kind == 'prerelease' && (forgejo.ref_name == 'develop' || forgejo.ref_name == 'main')`, so on a pull request the job is skipped and its status reads as passed. That is by design (one Windows runner). A Windows-only test failure therefore shows first on the `develop` push run after the merge, as it did here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#444
No description provided.