From de4d40a25c97ba4b6542976be5b45c8ce9ab2b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AB=E3=83=B3?= Date: Tue, 28 Apr 2026 10:50:47 +0900 Subject: [PATCH] style(database): fix gofmt comment indentation in concurrent_test.go Co-Authored-By: Claude Sonnet 4.6 --- database/concurrent_test.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/database/concurrent_test.go b/database/concurrent_test.go index 10fd042b..48b25ddb 100644 --- a/database/concurrent_test.go +++ b/database/concurrent_test.go @@ -24,9 +24,10 @@ import ( // occur at all. // // Chain of proof: -// TestConcurrentWrites/with_fix_* proves SetMaxOpenConns(1) fixes the bug. -// TestInitDBConcurrencyConfig/single_connection_pool proves InitDB calls it. -// Therefore InitDB fixes the bug. +// +// TestConcurrentWrites/with_fix_* proves SetMaxOpenConns(1) fixes the bug. +// TestInitDBConcurrencyConfig/single_connection_pool proves InitDB calls it. +// Therefore InitDB fixes the bug. func TestInitDBConcurrencyConfig(t *testing.T) { dbPath := filepath.Join(t.TempDir(), "test.db") if err := InitDB(dbPath); err != nil { @@ -63,13 +64,15 @@ func TestInitDBConcurrencyConfig(t *testing.T) { // The ONLY variable that differs between the two sub-tests is MaxOpenConns. // // Without fix (MaxOpenConns=2): -// conn1 acquires the SQLite write lock; conn2 is a separate connection that -// immediately tries to write and fails because it cannot wait out the lock. +// +// conn1 acquires the SQLite write lock; conn2 is a separate connection that +// immediately tries to write and fails because it cannot wait out the lock. // // With fix (MaxOpenConns=1): -// conn2 cannot be acquired from the pool while conn1 is in use, so it -// blocks at the Go pool level instead of racing at the SQLite level. -// Once conn1 is released, conn2 gets the connection and writes without error. +// +// conn2 cannot be acquired from the pool while conn1 is in use, so it +// blocks at the Go pool level instead of racing at the SQLite level. +// Once conn1 is released, conn2 gets the connection and writes without error. func TestConcurrentWrites(t *testing.T) { const busyTimeout = 10 // ms — short so lock contention fails fast