You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(ingest): extract shared helper for failure-skip pipeline tests
SonarCloud quality gate failed PR #74 on
new_duplicated_lines_density=3.5% (threshold 3%). The duplication is
between TestPipeline_FailedSpansSkipsLogs and
TestPipeline_FailedTracesAbortsBatch — same boilerplate, same waitFor,
same assertion shape. The waitFor 2s→5s bump made those lines "new
code", so Sonar recounted the existing duplication against the PR's
new-code budget.
Extract runFailureSkipsCheck(t, writer, forbidden...) — single helper
takes the configured fakeWriter and the BatchCreate* names that must
not fire after the seeded upstream failure. Each failing-path test
collapses to a single line.
Verification
* go test -race -count=3 -run 'TestPipeline_Failed*' — pass × 3
* go vet ./... clean
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments