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

nats-io / nats.go / 34334346817
85%

Build:
DEFAULT BRANCH: main
Ran 09 Sep 2026 09:28AM UTC
Jobs 1
Files 37
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

09 Sep 2026 09:22AM UTC coverage: 84.764% (+0.05%) from 84.71%
34334346817

push

github

web-flow
[FIXED] Messages(): handle a reconnect that completes between Next calls (#2135)

* [FIXED] Messages(): handle a reconnect that completes between Next calls

The pull request accounting of a Messages() iterator was only reset on
reconnect if the same Next call had observed both the RECONNECTING and
the CONNECTED status change: isConnected was a local of Next. With Next
driven by a short NextMaxWait, the reconnect regularly completed between
two calls, the CONNECTED event was discarded, pending stayed at the batch
size and no new pull request was ever sent. The iterator then went silent
on a healthy connection, permanently, with Next returning ErrTimeout and
the server reporting no waiting pull requests.

Track the connection state in the status goroutine that lives as long as
the iterator, and only forward a CONNECTED that follows a RECONNECTING.
Next now treats every errConnected as a real reconnect. The status
forwards also select on done so the goroutine cannot block forever on a
full errs channel after Stop.

Add a regression test that restarts the server while Next is polled with
a 100ms NextMaxWait; it fails on main with 5 of 10 messages delivered.

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

* ci: retrigger flaky TestPullConsumerFetchRace

---------

Signed-off-by: Parham Alvani <parham.alvani@gmail.com>

16 of 19 new or added lines in 1 file covered. (84.21%)

8 existing lines in 2 files now uncovered.

12857 of 15168 relevant lines covered (84.76%)

46109.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
88.76
-0.38% jetstream/pull.go

Coverage Regressions

Lines Coverage ∆ File
5
82.97
-0.24% js.go
3
89.02
0.34% nats.go
Jobs
ID Job ID Ran Files Coverage
1 34334346817.1 09 Sep 2026 09:28AM UTC 37
84.76
GitHub Action Run
Source Files on build 34334346817
  • Tree
  • List 37
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34334346817
  • afa49df2 on github
  • Prev Build on main (#34268015121)
  • Next Build on main (#34373362311)
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