Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
fix(test): increase the number of nodes in the drop test from 3 to 4
Browse files Browse the repository at this point in the history
So that dropping one still leaves supermajority up (previosly needed only simple majority).
  • Loading branch information
madadam committed Mar 22, 2021
1 parent b729a87 commit 9ce0ec7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use sn_routing::{Event, NodeElderChange};

#[tokio::test]
async fn test_node_drop() -> Result<()> {
// NOTE: create at least 3 nodes, so when one is dropped the remaining ones still form a
// majority and the `Offline` votes accumulate.
let mut nodes = create_connected_nodes(3).await?;
// NOTE: create at least 4 nodes, so when one is dropped the remaining ones still form a
// supermajority and the `Offline` votes accumulate.
let mut nodes = create_connected_nodes(4).await?;

for (_, events) in &mut nodes[1..] {
assert_event!(
Expand Down

0 comments on commit 9ce0ec7

Please sign in to comment.