Skip to content

tests: tighten coverage by retiring unreachable defensive code#2

Merged
TeoSlayer merged 1 commit into
mainfrom
coverage-housekeeping
May 28, 2026
Merged

tests: tighten coverage by retiring unreachable defensive code#2
TeoSlayer merged 1 commit into
mainfrom
coverage-housekeeping

Conversation

@TeoSlayer
Copy link
Copy Markdown
Contributor

Summary

  • Drop the post-NewClient nil guard in startClientLocked. NewClient returns nil only when url == "", which is already short-circuited at the top of the function, so the guard was dead code.

Coverage

  • Before: 99.4%
  • After: 100.0%

Test plan

  • go test -race -count=1 -timeout 120s ./... passes
  • Coverage report confirms 100.0% statements

Drop the post-NewClient nil guard in startClientLocked. NewClient returns
nil only when url == "", and that case is already short-circuited at the
top of startClientLocked, so the guard is unreachable. Coverage 99.4% -> 100%.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@TeoSlayer TeoSlayer merged commit 8f8e53d into main May 28, 2026
2 checks passed
@TeoSlayer TeoSlayer deleted the coverage-housekeeping branch May 28, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants