Standard 3-voter (or N-voter) test config with no learners/observers.
(node_id: u64, peers: Vec<u64>)
| 12 | |
| 13 | /// Standard 3-voter (or N-voter) test config with no learners/observers. |
| 14 | pub(super) fn test_config(node_id: u64, peers: Vec<u64>) -> RaftConfig { |
| 15 | RaftConfig { |
| 16 | node_id, |
| 17 | group_id: 1, |
| 18 | peers, |
| 19 | learners: vec![], |
| 20 | observers: vec![], |
| 21 | starts_as_learner: false, |
| 22 | starts_as_observer: false, |
| 23 | election_timeout_min: Duration::from_millis(150), |
| 24 | election_timeout_max: Duration::from_millis(300), |
| 25 | heartbeat_interval: Duration::from_millis(50), |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /// Config where `node_id` is itself an observer (no peers). |
| 30 | pub(super) fn observer_self_config(node_id: u64) -> RaftConfig { |
no outgoing calls
no test coverage detected