test(coordinator): cover ServeAddress for a worker that is not connected #455

Merged
admin merged 1 commits from test/serve-address-of-absent-worker into dev 2026-10-18 20:21:28 +00:00
Owner

Problem

The test job on #451 (at 10c00d0) failed make cover with:

not covered: apps/sisyphusd/coordinator/coordinator.go:1324.2,1324.11

That line is ServeAddress's return "" for a worker that isn't connected, and #451 doesn't touch it. Before this PR it was covered only when a daemon test happened to ask for the address of a follower that had just disconnected, for example while #452's late unary sync briefly counted a lost follower as present. That timing isn't deterministic, so coverage of the line flaked. #454 fixes #452 and makes that lookup rarer still.

Change

A unit test in coordinator/address_test.go covers both branches of ServeAddress: a connected worker's address, and the empty answer for one that isn't connected. It is test-only, so no docs change.

Verification

  • go test ./apps/sisyphusd/coordinator -run TestTheServeAddress -coverprofile: lines 1322 to 1324 are covered.
  • go vet and staticcheck on the package, and git diff --check.
## Problem The `test` job on #451 (at 10c00d0) failed `make cover` with: ``` not covered: apps/sisyphusd/coordinator/coordinator.go:1324.2,1324.11 ``` That line is `ServeAddress`'s `return ""` for a worker that isn't connected, and #451 doesn't touch it. Before this PR it was covered only when a daemon test happened to ask for the address of a follower that had just disconnected, for example while #452's late unary sync briefly counted a lost follower as present. That timing isn't deterministic, so coverage of the line flaked. #454 fixes #452 and makes that lookup rarer still. ## Change A unit test in `coordinator/address_test.go` covers both branches of `ServeAddress`: a connected worker's address, and the empty answer for one that isn't connected. It is test-only, so no docs change. ## Verification - `go test ./apps/sisyphusd/coordinator -run TestTheServeAddress -coverprofile`: lines 1322 to 1324 are covered. - `go vet` and `staticcheck` on the package, and `git diff --check`.
excho0 approved these changes 2026-10-18 20:09:42 +00:00
excho0 left a comment
Owner

The test covers both ServeAddress outcomes without changing production code: a connected worker returns its serving address and an absent worker returns empty. No changes requested. /cc @rvnminers-A-and-N

The test covers both ServeAddress outcomes without changing production code: a connected worker returns its serving address and an absent worker returns empty. No changes requested. /cc @rvnminers-A-and-N
Sign in to join this conversation.
No Reviewers
No labels area:daemon test
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Sisyphus/Sisyphus#455