mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
chore: refactor test (#2007)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user