Skip to content
Snippets Groups Projects
Commit ae1351cb authored by Marcio Diaz's avatar Marcio Diaz Committed by GitHub
Browse files

chore: refactor test (#2007)

parent 32ae38c7
No related merge requests found
......@@ -158,26 +158,6 @@ fn sync_from_two_peers_with_ancestry_search_works() {
.canon_equals_to(net.peer(1).client.backend().as_in_memory().blockchain()));
}
#[test]
fn ancestry_search_works_when_common_is_hundred() {
let _ = ::env_logger::try_init();
let mut net = TestNet::new(3);
net.peer(0).push_blocks(100, false);
net.peer(1).push_blocks(100, false);
net.peer(2).push_blocks(100, false);
net.peer(0).push_blocks(10, true);
net.peer(1).push_blocks(100, false);
net.peer(2).push_blocks(100, false);
net.restart_peer(0);
net.sync();
assert!(net.peer(0).client.backend().as_in_memory().blockchain()
.canon_equals_to(net.peer(1).client.backend().as_in_memory().blockchain()));
}
#[test]
fn ancestry_search_works_when_backoff_is_one() {
let _ = ::env_logger::try_init();
......@@ -218,6 +198,11 @@ fn ancestry_search_works_when_common_is_two() {
test_ancestor_search_when_common_is(2);
}
#[test]
fn ancestry_search_works_when_common_is_hundred() {
test_ancestor_search_when_common_is(100);
}
#[test]
fn sync_long_chain_works() {
let mut net = TestNet::new(2);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment