chore(test): remove test helpers that repeat existing ones from PR #282
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia da internal/indexer/sync_shared_test.go e internal/indexer/pipeline_test.go per confrontare setSyncBeforeCommitHook con il setHook generico, poi passa a internal/graphstore/shared_test.go per i tre helper setShared*Hook e blockFirstOpen. Controlla anche internal/daemon/catchup_test.go (runHeld, startFakeRun) e testbudget_test.go. Il lavoro è completo quando gli helper duplicati sono rimossi, i test interessati richiamano gli helper condivisi e go test ./... continua a passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Merge medio
- 7h 42m
- PR unite (30g)
- 111
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di seanb4t/codegraph-go
-
chore needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
seanb4t/codegraph-go#380 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
seanb4t/codegraph-go#379 ·
I maintainer di solito rispondono entro 1 giorno
-
area:query chore needs-triage spec-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
seanb4t/codegraph-go#377 ·
I maintainer di solito rispondono entro 1 giorno
-
chore needs-triage
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
seanb4t/codegraph-go#362 ·
I maintainer di solito rispondono entro 1 giorno
-
area:query bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
seanb4t/codegraph-go#355 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di seanb4t/codegraph-go
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
automated documentation maintenance
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
github/gh-aw-mcpg#16717 ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deletedApertainternal
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
jesseduffield/lazygit#6229 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
prometheus/prometheus#20482 ·
I maintainer di solito rispondono entro 2 giorni