Minor test tweaks and code cleanup

This commit is contained in:
arkpar
2016-02-16 23:33:32 +01:00
parent fbe06d3f2f
commit 7e0dfb41d0
2 changed files with 5 additions and 22 deletions

View File

@@ -544,6 +544,7 @@ mod tests {
for _ in 0..1200 {
discovery.add_node(NodeEntry { id: NodeId::random(), endpoint: ep.clone() });
}
assert!(Discovery::nearest_node_entries(&NodeId::new(), &discovery.node_buckets).len() <= 16);
let removed = discovery.check_expired(true).len();
assert!(removed > 0);
}