doc: Document main_test.go refactoring analysis (bd-1rh)
Analysis shows main_test.go is NOT a good candidate for shared DB pattern due to global state manipulation and integration test characteristics. Changes: - Added MAIN_TEST_REFACTOR_NOTES.md documenting findings - Fixed unused import in duplicates_test.go (from recent pull) Key findings: - 18 tests with 14 newTestStore() calls - Tests manipulate global state (autoFlushEnabled, isDirty, etc.) - Tests simulate workflows (flush, import) not just CRUD - Shared DB causes deadlocks between flush ops and cleanup - Integration tests need process-level isolation Recommendation: Leave as-is or use Option 2 (grouped tests without shared DB). Focus P2 efforts on integrity_test.go instead. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/steveyegge/beads/internal/types"
|
||||
|
||||
Reference in New Issue
Block a user