()
| 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() { |
nothing calls this directly
no test coverage detected