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

go-pkgz / fileutils / 32205961824
72%

Build:
DEFAULT BRANCH: master
Ran 19 Aug 2026 01:43AM UTC
Jobs 1
Files 2
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

19 Aug 2026 01:43AM UTC coverage: 70.326%. Remained the same
32205961824

push

github

web-flow
replace sleeps in watcher tests with event synchronisation (#7)

The four watcher tests guarded themselves with os.Getenv("GOOS") == "darwin",
which never matched: GOOS is a build variable, not something the go tool exports
into the test environment. The tests therefore ran everywhere, on fixed sleeps
that were tuned for the skip that never happened.

Waiting is now driven by the events themselves. A shared waitForEvent helper
consumes the channel until the expected path shows up, returning what it skipped
so a test can assert on what should not have been reported, and gives up on a
single deadline instead of a chain of sleeps.

The 100ms and 200ms "let the watcher initialize" sleeps are gone, the watched
path is registered with the kernel before NewFileWatcher and WatchRecursive
return, so events raised afterwards are queued regardless of when the consuming
goroutine is scheduled. TestWatchRecursive no longer needs its warmup file and
timed drain loop, since waitForEvent skips past unrelated events on its own.

The event buffer goes from 10 to 100, so an expected event cannot be dropped by
the callback's non-blocking send while the test is busy.

Package tests drop from about 2.6s to 1.3s.

237 of 337 relevant lines covered (70.33%)

4.19 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32205961824.1 19 Aug 2026 01:43AM UTC 2
70.33
GitHub Action Run
Source Files on build 32205961824
  • Tree
  • List 2
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bc12528e on github
  • Prev Build on master (#32205524377)
  • Next Build on master (#32205969973)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc