• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nagayon-935 / mping / 28497976334
85%

Build:
DEFAULT BRANCH: main
Ran 01 Jul 2026 06:23AM UTC
Jobs 1
Files 25
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jul 2026 06:23AM UTC coverage: 83.642% (-0.3%) from 83.975%
28497976334

push

github

nagayon-935
fix: discard torn discover() rounds instead of reporting a false flap

CI was failing intermittently on TestEngine_OnFlap_NotCalledOnSameRoute
(internal/mtr). Root cause: discover()'s per-TTL goroutines each check
ctx.Err() independently before appending their result. When Stop()'s
context cancellation races a RediscoverEvery tick, goroutines that check
ctx.Err() before cancellation append their result while ones that check
after it do not, producing a torn result set for that round — e.g. the
TTL that actually reached the destination can be dropped while
unresponsive higher TTLs still get registered, making the hop count
jump (1 -> cfg.MaxHops) and RouteSnapshot/CheckFlap see the round as a
spurious path-length change.

discover() now checks ctx.Err() once after wg.Wait() and discards the
whole round (returns 0, its only otherwise-unused value) rather than
registering a partial view. runTarget's rediscover branch treats that
sentinel the same way it already treats ctx.Err() at the initial
discovery call site: skip the flap check and keep the previous
hopCount, letting the next loop iteration observe ctx.Done() normally.

Reproduced locally (~7% failure rate over 30 runs); 100/100 clean after
the fix, and 20x -race runs of the mtr package pass.

12 of 20 new or added lines in 1 file covered. (60.0%)

164 existing lines in 7 files now uncovered.

4612 of 5514 relevant lines covered (83.64%)

0.98 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
78.92
-2.72% internal/mtr/engine.go

Coverage Regressions

Lines Coverage ∆ File
53
77.41
-0.54% cmd/main/mping.go
46
80.9
-0.38% internal/ui/tui.go
24
49.53
-0.47% internal/pinger/traceroute.go
18
85.52
0.0% internal/ui/graph.go
12
88.43
-2.09% internal/pinger/portchecker.go
7
85.71
-4.48% internal/pinger/httpchecker.go
4
90.53
0.04% internal/pinger/pinger.go
Jobs
ID Job ID Ran Files Coverage
1 28497976334.1 01 Jul 2026 06:23AM UTC 25
83.64
GitHub Action Run
Source Files on build 28497976334
  • Tree
  • List 25
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9ee0dcea on github
  • Prev Build on main (#28496243010)
  • Next Build on main (#28570697393)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc