Skip to content

test(sql): bound spawned fixture lifetime so a test timeout cannot leave orphans#32207

Merged
alii merged 1 commit into
mainfrom
ali/sql-test-fixture-timeout
Jun 12, 2026
Merged

test(sql): bound spawned fixture lifetime so a test timeout cannot leave orphans#32207
alii merged 1 commit into
mainfrom
ali/sql-test-fixture-timeout

test(sql): bound spawned fixture lifetime so a test timeout cannot le…

34cc345
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 12, 2026 in 29m 7s

Code review found 1 important issue

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/js/sql/sql-mysql-column-name-digits.test.ts:91 60s timeout on mysqld_safe daemon may kill the database server mid-test

Annotations

Check failure on line 91 in test/js/sql/sql-mysql-column-name-digits.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

60s timeout on mysqld_safe daemon may kill the database server mid-test

Unlike the other 8 spawns in this PR (short-lived bun fixture clients), `mysqld_safe` is the long-running MariaDB server daemon — it is supposed to stay alive for the duration of the test, and `.unref()` does not cancel the spawn timeout timer. With `waitForSocket` budgeted up to 30s for cold start, plus `provisionTcpUser` and a debug/ASAN fixture run, the 60s timer can fire mid-test and SIGTERM the database out from under the fixture, causing a spurious failure. The PR's rationale (fixture clie