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:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user