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

prisma-risk / tsoracle / 26486441515
95%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 02:13AM UTC
Jobs 1
Files 89
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

27 May 2026 02:07AM UTC coverage: 94.98% (+0.006%) from 94.974%
26486441515

push

github

web-flow
test(standalone): eliminate close/rebind port-bind race in openraft_membership tests (#530)

* test(standalone): eliminate close/rebind port-bind race in openraft_membership tests

The lease_port → drop(lease) → build(addr) pattern leaves a window between
the listener drop and the consumer's own TcpListener::bind(addr) inside
build_openraft. Under parallel-test load the kernel can re-issue the
freshly-freed ephemeral port to another bind(:0), causing AdminBind /
PeerBind { AddrInUse } panics. Observed today as the only failing test in
PR #519's coverage job (admin_grpc_list_and_add_learner at
openraft_membership.rs:198, AddrInUse on 127.0.0.1:43429, while PR #519
itself touches only docs).

The narrow-the-window mitigation (keep the listener alive until just
before the consumer binds) is what we already had — but the consumer's
bind is many ms downstream (RocksDB open, raft init, then peer/admin
bind), so the window stayed large enough to flake.

Close the window mathematically: thread the pre-bound TcpListener
through build, so the test never drops it. PortLease::into_listener
hands the held socket directly to a new test-only build path:

  build_openraft_with_listeners(cfg, raft_listener, admin_listener)
    → build_openraft_inner(cfg, Some(raft), admin)
  build_openraft(cfg)
    → build_openraft_inner(cfg, None, None)  // unchanged production

Production code (no listener supplied) binds inline at the same call
sites as before — preserving error precedence and the existing
PeerBind/AdminBind failure paths exercised by build_in_process.rs's
bind-conflict tests.

The test-only entry point is gated on `cfg(any(test, feature =
"test-support"))`, matching the existing seam pattern in
admin/mod.rs::test_support. tests/openraft_membership.rs is gated on
the same feature and gets a [[test]] required-features entry so cargo
prints a visible skip notice when the feature is not enabled — mirrors
the existing activation_admin_rpc test target.

Refactors serve_... (continued)

55 of 55 new or added lines in 3 files covered. (100.0%)

3 existing lines in 1 file now uncovered.

13547 of 14263 relevant lines covered (94.98%)

340870.24 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
84.9
0.28% crates/tsoracle-standalone/src/drivers/openraft/mod.rs
Jobs
ID Job ID Ran Files Coverage
1 26486441515.1 27 May 2026 02:13AM UTC 89
94.98
GitHub Action Run
Source Files on build 26486441515
  • Tree
  • List 89
  • Changed 5
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26486441515
  • 03435eb2 on github
  • Prev Build on main (#26486155199)
  • Next Build on main (#26486831654)
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