Skip to content

Commit 3ed5c31

Browse files
wesmclaude
andcommitted
fix: broaden lock-contention allowlist in TestMigrationRace
Add SQLITE_LOCKED and "database schema is locked" to the set of tolerated concurrent Open errors alongside SQLITE_BUSY. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 992355d commit 3ed5c31

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/db/db_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,9 @@ func TestMigrationRace(t *testing.T) {
14581458
if err := <-errCh; err != nil {
14591459
msg := err.Error()
14601460
if strings.Contains(msg, "database is locked") ||
1461-
strings.Contains(msg, "SQLITE_BUSY") {
1461+
strings.Contains(msg, "database schema is locked") ||
1462+
strings.Contains(msg, "SQLITE_BUSY") ||
1463+
strings.Contains(msg, "SQLITE_LOCKED") {
14621464
t.Logf("concurrent Open lock contention: %v", err)
14631465
} else {
14641466
t.Errorf("unexpected concurrent Open error: %v", err)

0 commit comments

Comments
 (0)