Skip to content

Commit

Permalink
Use is_listening flag in connection_restart_behavior test
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Mar 7, 2024
1 parent 0396fc5 commit b052f15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/integration_tests_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,11 @@ fn do_connection_restart_behavior(persist: bool) {
let node_id_b = node_b.node_id();

let node_addr_b = node_b.listening_addresses().unwrap().first().unwrap().clone();
std::thread::sleep(std::time::Duration::from_secs(1));

while !node_b.status().is_listening {
std::thread::sleep(std::time::Duration::from_millis(10));
}

node_a.connect(node_id_b, node_addr_b, persist).unwrap();

let peer_details_a = node_a.list_peers().first().unwrap().clone();
Expand Down

0 comments on commit b052f15

Please sign in to comment.