Commit b8b9893
committed
fix(raftadmin): fakeEngine implements RegisterLeaderAcquiredCallback
CI failure on PR #723 (test (ubuntu-latest)):
TestServerMapsEngineAdminMethods returned "add voter is not
supported by this raft engine" because the type-assertion at
internal/raftadmin/server.go:21 (any(engine).(raftengine.Admin))
silently fell back to admin=nil after Phase 3.D PR 4-B-3b
extended the Admin interface with RegisterLeaderAcquiredCallback.
The test stub fakeEngine never gained the method, so it stopped
satisfying the interface — and every admin RPC mapped through
NewServer returned Unimplemented.
This is exactly the "semantic-change-without-full-caller-audit"
miss the recent lessons-learned discipline targets. PR #723's
audit grep was on the production resolver helpers, not on the
Admin interface itself; raftadmin's stub slipped through.
Fix: add the missing method on the stub. Returns a no-op
deregister — raftadmin doesn't exercise the leader-acquired
observer (PR 4-B-3b's SQS leadership-refusal lives in
main_sqs_leadership_refusal.go), the stub's only obligation is
to satisfy the type assertion.
go test -race ./... and golangci-lint clean.1 parent 634fbcf commit b8b9893
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
140 | 152 | | |
141 | 153 | | |
142 | 154 | | |
| |||
0 commit comments