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

nats-io / nats-server / 12740792186
83%

Build:
DEFAULT BRANCH: main
Ran 13 Jan 2025 05:44AM UTC
Jobs 1
Files 57
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

10 Jan 2025 10:21PM UTC coverage: 85.519% (-0.002%) from 85.521%
12740792186

push

github

web-flow
Test: expected a fully formed cluster error (#6364)

Cluster tests would sometimes fail with the following error message:
```
jetstream_helpers_test.go:774: Expected a fully formed cluster, only 0 of 3 peers seen
```

This was due to a logic error in the tests, where it was assumed that
once a meta leader is chosen it will remain the same. That's not always
true as the meta leader can still shift around. So, keep fetching the
latest leader and check the peers on that.

Previously it would fail by selecting a meta leader, the meta leader
would change, and the follower would then be used to request peers on.
But because of the following lines in `JetStreamClusterPeers()`:
```go
	cc := js.cluster
	if !cc.isLeader() || cc.meta == nil {
		return nil
	}
```
You'd get no peers at all, leading into that error message.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

68599 of 80215 relevant lines covered (85.52%)

915532.71 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
93.86
0.12% src/github.com/nats-io/nats-server/server/route.go
2
80.81
0.0% src/github.com/nats-io/nats-server/server/opts.go
3
90.53
-0.04% src/github.com/nats-io/nats-server/server/leafnode.go
3
86.26
-0.09% src/github.com/nats-io/nats-server/server/accounts.go
4
93.63
-0.17% src/github.com/nats-io/nats-server/server/gateway.go
4
95.03
0.09% src/github.com/nats-io/nats-server/server/client.go
5
73.56
0.03% src/github.com/nats-io/nats-server/server/jetstream_api.go
10
84.91
0.66% src/github.com/nats-io/nats-server/server/raft.go
13
84.84
-0.11% src/github.com/nats-io/nats-server/server/stream.go
14
85.32
0.53% src/github.com/nats-io/nats-server/server/memstore.go
15
89.04
-0.38% src/github.com/nats-io/nats-server/server/mqtt.go
18
88.06
-0.07% src/github.com/nats-io/nats-server/server/consumer.go
42
81.69
0.3% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
64
83.25
-0.69% src/github.com/nats-io/nats-server/server/filestore.go
Jobs
ID Job ID Ran Files Coverage
1 12740792186.1 13 Jan 2025 05:44AM UTC 57
85.52
GitHub Action Run
Source Files on build 12740792186
  • Tree
  • List 57
  • Changed 44
  • Source Changed 0
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #12740792186
  • 1515a6f2 on github
  • Prev Build on main (#12730529914)
  • Next Build on main (#12761257432)
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