feat(raft-library): task 5.3 — Groups D+E 7 test cases; fix Req 6.3 on_cancel_timeout in decided path

This commit is contained in:
Rongsong Shen 2026-05-31 06:58:02 +00:00
parent 0aa4c84bfe
commit 5c677bc52d
3 changed files with 279 additions and 3 deletions

View file

@ -117,7 +117,7 @@
- All 11 Unity test cases pass
- _Requirements: 1.2, 3.4, 3.5, 7.2, 7.3, 8.3_
- [ ] 5.3 Test Groups D and E: quorum evaluation and election timeout (7 cases)
- [x] 5.3 Test Groups D and E: quorum evaluation and election timeout (7 cases)
- D1: 3-node cluster, 1 peer grant received (self + 1 = quorum 2) → `role==RAFT_LEADER`; `on_become_leader` fired once
- D2: 3-node, both peers deny → `election_decided==1`, `role==RAFT_FOLLOWER`; `on_become_follower` fired
- D3: `on_become_leader` fired; second vote reply arrives → returns `RAFT_PENDING`; `leader_count` stays 1