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

Function propose_as_follower_fails

nodedb-raft/src/node/core.rs:327–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325
326 #[test]
327 fn propose_as_follower_fails() {
328 let config = test_config(1, vec![2, 3]);
329 let node = &mut RaftNode::new(config, MemStorage::new());
330 let err = node.propose(b"data".to_vec()).unwrap_err();
331 assert!(matches!(err, RaftError::NotLeader { .. }));
332 }
333
334 #[test]
335 fn snapshot_needed_after_compaction() {

Callers

nothing calls this directly

Calls 3

test_configFunction · 0.70
proposeMethod · 0.45
to_vecMethod · 0.45

Tested by

no test coverage detected