MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / test_config

Function test_config

nodedb-raft/src/node/core.rs:278–291  ·  view source on GitHub ↗
(node_id: u64, peers: Vec<u64>)

Source from the content-addressed store, hash-verified

276 use std::time::Duration;
277
278 fn test_config(node_id: u64, peers: Vec<u64>) -> RaftConfig {
279 RaftConfig {
280 node_id,
281 group_id: 1,
282 peers,
283 learners: vec![],
284 observers: vec![],
285 starts_as_learner: false,
286 starts_as_observer: false,
287 election_timeout_min: Duration::from_millis(150),
288 election_timeout_max: Duration::from_millis(300),
289 heartbeat_interval: Duration::from_millis(50),
290 }
291 }
292
293 #[test]
294 fn single_node_election() {

Calls

no outgoing calls

Tested by

no test coverage detected