chore(test): remove test helpers that repeat existing ones from PR #282
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu từ internal/indexer/sync_shared_test.go và internal/indexer/pipeline_test.go để so sánh setSyncBeforeCommitHook với setHook tổng quát, sau đó xem internal/graphstore/shared_test.go cho ba helper setShared*Hook và blockFirstOpen. Cũng kiểm tra internal/daemon/catchup_test.go (runHeld, startFakeRun) và testbudget_test.go. Hoàn thành khi các helper trùng lặp được xóa, các test liên quan gọi các helper dùng chung và go test ./... vẫn chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What kind of chore?
Test infrastructure
What needs doing?
PR #282 added four test helpers that repeat helpers their packages already have. Each fix keeps behavior the same and changes only test files.
internal/indexer/sync_shared_test.go:16:setSyncBeforeCommitHookrepeats the genericsetHookininternal/indexer/pipeline_test.go. Widen thetparameter ofsetHookto an interface withHelperandCleanup, so*rapid.Tfits. CallsetHook(t, &syncBeforeCommitHook, ...)instead.internal/graphstore/shared_test.go:setSharedOpenHook,setSharedCloseHookandsetSharedWaitHookdiffer only in the variable they set. Add one genericsetHook[T any](t, hook *T, value T)to the graphstore tests. Call it for all three.internal/daemon/catchup_test.go:145:runHeldinTestRunCatchUpSyncOnHeldStorerepeats theawaitEpisodeloop ofTestDaemonFlushLockRequeueGivesUpPerEpisode. Hoist one helper besidestartFakeRun, built on the receive helper intestbudget_test.go. Call it from both tests.internal/graphstore/shared_test.go:349:TestOpenOfSecondPathDoesNotWaitcopies the body of theblockFirstOpenclosure. That closure is local toTestSharedHandleWaitersShareOpen. MoveblockFirstOpento file level.
The line numbers come from the review at ecc22e07. Current lines can differ.
Why now?
The OpenSpec review of the shared-store-handle change flagged these copies under its fit lens. The copies came in with #282 (commit c6788f5d). A later edit to one copy will not reach the others, so the duplicates can drift apart and hide a test bug. Tidiness is the trigger here, so this is lower priority.
Does this touch anything load-bearing?
- The release pipeline (
release.yml,.goreleaser.yaml, signing) - The upgrade identity (
internal/upgrade/verify.go) - The perf baseline (
tools/bench/baseline.json) - The graph schema / meta-key layout
- None of these
Before submitting
- I searched existing issues and this is not a duplicate
- Ngôn ngữ chính
- Go
- Star
- 0
- Fork
- 0
- Merge trung bình
- 7 giờ 42 phút
- Pull request đã merge (30 ngày)
- 111
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của seanb4t/codegraph-go
-
chore needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
seanb4t/codegraph-go#380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
seanb4t/codegraph-go#379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query chore needs-triage spec-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
seanb4t/codegraph-go#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
seanb4t/codegraph-go#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
seanb4t/codegraph-go#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của seanb4t/codegraph-go
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated documentation maintenance
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
github/gh-aw-mcpg#16717 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deletedĐang mởinternal
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jesseduffield/lazygit#6229 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
prometheus/prometheus#20482 ·
Maintainer thường phản hồi trong vòng 2 ngày