fix: Remove duplicate context variable declarations in benchmark tests

Fixed compilation errors in benchmark test files where `ctx` was
declared twice, preventing benchmarks from running.

Changes:
- internal/storage/sqlite/bench_helpers_test.go: Remove duplicate ctx declaration
- internal/storage/sqlite/compact_bench_test.go: Remove duplicate ctx declaration

This allows `go test -tags=bench` to compile and run successfully.

Related to bd-5qim verification.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-23 19:34:06 -08:00
parent 1d3d1f1c8b
commit 24965ebee2
3 changed files with 665 additions and 669 deletions

View File

@@ -92,14 +92,11 @@ func getCachedOrGenerateDB(b *testing.B, cacheKey string, generateFn func(contex
ctx := context.Background()
store, err := New(ctx, dbPath)
if err != nil {
b.Fatalf("Failed to create storage: %v", err)
}
ctx := context.Background()
// Initialize database with prefix
if err := store.SetConfig(ctx, "issue_prefix", "bd-"); err != nil {
store.Close()

View File

@@ -127,7 +127,6 @@ func setupBenchDB(tb testing.TB) (*SQLiteStorage, func()) {
tb.Fatalf("Failed to create storage: %v", err)
}
ctx := context.Background()
if err := store.SetConfig(ctx, "issue_prefix", "bd"); err != nil {
tb.Fatalf("Failed to set issue_prefix: %v", err)
}