Skip to content

Commit

Permalink
test: diconnect check by all part
Browse files Browse the repository at this point in the history
  • Loading branch information
driftluo committed Sep 30, 2019
1 parent fe723c0 commit a476541
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/src/specs/sync/ibd_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,16 @@ impl Spec for IBDProcessWithWhiteList {
panic!("node6 can't generate blocks to 2");
}

node0.connect_uncheck(node6);
let is_disconnect_already = wait_until(10, || {
let peers = rpc_client0.get_peers();
peers.iter().any(|peer| peer.node_id == node6.node_id())
});

if is_disconnect_already {
panic!("node6 can't disconnect with node0");
}

node0.connect(node6);

// IBD only with outbound/whitelist node
let rpc_client1 = node1.rpc_client();
Expand Down

0 comments on commit a476541

Please sign in to comment.