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:
1330
.beads/beads.jsonl
1330
.beads/beads.jsonl
File diff suppressed because one or more lines are too long
@@ -92,14 +92,11 @@ func getCachedOrGenerateDB(b *testing.B, cacheKey string, generateFn func(contex
|
|||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
|
|
||||||
store, err := New(ctx, dbPath)
|
store, err := New(ctx, dbPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
b.Fatalf("Failed to create storage: %v", err)
|
b.Fatalf("Failed to create storage: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
// Initialize database with prefix
|
// Initialize database with prefix
|
||||||
if err := store.SetConfig(ctx, "issue_prefix", "bd-"); err != nil {
|
if err := store.SetConfig(ctx, "issue_prefix", "bd-"); err != nil {
|
||||||
store.Close()
|
store.Close()
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ func setupBenchDB(tb testing.TB) (*SQLiteStorage, func()) {
|
|||||||
tb.Fatalf("Failed to create storage: %v", err)
|
tb.Fatalf("Failed to create storage: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
|
||||||
if err := store.SetConfig(ctx, "issue_prefix", "bd"); err != nil {
|
if err := store.SetConfig(ctx, "issue_prefix", "bd"); err != nil {
|
||||||
tb.Fatalf("Failed to set issue_prefix: %v", err)
|
tb.Fatalf("Failed to set issue_prefix: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user