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

go-pkgz / jrpc / 32195408814
92%

Build:
DEFAULT BRANCH: master
Ran 18 Aug 2026 11:02PM UTC
Jobs 1
Files 4
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

18 Aug 2026 11:01PM UTC coverage: 92.281% (+3.3%) from 89.011%
32195408814

push

github

web-flow
Enforce CallTimeout, fix readme examples and flaky tests (#18)

* Bind listener before serving, drop fixed test port and sleeps

Run is split into activate and serve, so tests start the server on a
pre-bound 127.0.0.1:0 listener instead of the hardcoded port 9091.

Previously, every server test raced Run in a goroutine, discarded the bind
error and waited 10ms hoping the server was up, so a busy port or a slow
machine turned into a misleading handler failure. Run now also reports the
bind error wrapped with the port number, and rejects an empty dispatch map
before taking the port.

* Enforce CallTimeout with http.TimeoutHandler

Previously, the CallTimeout option only attached a deadline to the request
context, which no ServerFn can observe, so a slow or blocked handler ran to
completion and the caller waited for it regardless of the configured value.
The middleware now aborts the call at the deadline, responds with 503 and a
json error body, and drops the late handler writes.

* Document that basic auth needs both user and password set

The Auth option enables authentication only when both values are non-empty,
and with either of them empty the server keeps answering every request. That
was stated nowhere except a warning log line, so a partially configured
plugin looked protected while it was not.

* Fix readme options block, add examples and a quick start

The options example used WithTimeout and WithtSignature, neither of which
exists, and a chi middleware list with an invalid rune literal, so nothing
in that block compiled. It is corrected and mirrored by compile-checked
Example functions, and the readme now spells out how to run the plugin and
the application from _example.

* Replace interface{} with any

Result of go fix on the package, no behaviour or API change since any is an
alias for interface{}.

* Activate router before binding, keep CallTimeout under WriteTimeout

Run builds the router before taking the port, so a panic on an invalid a... (continued)

26 of 27 new or added lines in 3 files covered. (96.3%)

263 of 285 relevant lines covered (92.28%)

10.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
94.62
4.97% server.go
Jobs
ID Job ID Ran Files Coverage
1 32195408814.1 18 Aug 2026 11:02PM UTC 4
92.28
GitHub Action Run
Source Files on build 32195408814
  • Tree
  • List 4
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 72a5b104 on github
  • Prev Build on refs/tags/v0.4.0 (#19909802073)
  • Next Build on master (#32204940518)
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