test(ha-config-bootstrap): add RED-phase tests for repl_wait_majority_ack and pending_ack_count (task 7.1)

This commit is contained in:
Rongsong Shen 2026-05-28 13:27:27 +00:00
parent 7c27ff1954
commit f6030749de
4 changed files with 239 additions and 1 deletions

View file

@ -148,7 +148,7 @@ Dependency order: startup validation (D) unblocks vtaskmgr before election (A);
- _Boundary: Term Durability (ha.c)_
- [ ] 7. Change E: Majority-commit WAL replication
- [ ] 7.1 Write failing tests for repl_broadcast and repl_wait_majority_ack
- [x] 7.1 Write failing tests for repl_broadcast and repl_wait_majority_ack
- In `src/controller/testsuite/test_repl_majority.c`: test 2/3 ACKs → `repl_wait_majority_ack` returns 0; test timeout returns `-ETIMEDOUT`; test single-node (`n_active == 0`) returns 0 immediately; test `in_catch_up=1` standby excluded from quorum denominator; test `pending_ack_count > max` removes standby from active set; test `OP_walAck` vs `OP_upgradeConfigAck` dispatched separately via `ack_op`
- `make test` fails
- _Requirements: 5.1, 5.4, 5.5, 5.8, 8.2_