Skip to content

Commit f64f3e9

Browse files
committed
Use is_listening flag in connection_restart_behavior test
1 parent 9a65188 commit f64f3e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration_tests_rust.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,11 @@ fn do_connection_restart_behavior(persist: bool) {
290290
let node_id_b = node_b.node_id();
291291

292292
let node_addr_b = node_b.listening_addresses().unwrap().first().unwrap().clone();
293-
std::thread::sleep(std::time::Duration::from_secs(1));
293+
294+
while !node_b.status().is_listening {
295+
std::thread::sleep(std::time::Duration::from_millis(10));
296+
}
297+
294298
node_a.connect(node_id_b, node_addr_b, persist).unwrap();
295299

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

0 commit comments

Comments
 (0)