Skip to content

Commit

Permalink
Add test for size
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Jan 14, 2018
1 parent 2721eee commit 4ea39e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/conhash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ mod test {
ch.remove(&ServerNode::new("localhost", 12350));
assert_eq!(ch.get_str("hello").unwrap().clone(), node_for_hello);

assert_eq!(ch.len(), (nodes.len() - 1) * REPLICAS);

ch.remove(&ServerNode::new("localhost", 12347));
assert_ne!(ch.get_str("hello").unwrap().clone(), node_for_hello);

assert_eq!(ch.len(), (nodes.len() - 2) * REPLICAS);
}
}

0 comments on commit 4ea39e5

Please sign in to comment.