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>
6.5 KiB
6.5 KiB