Skip to content

Commit e317d13

Browse files
committed
Use is_listening flag in connection_restart_behavior test
1 parent bb3a94f commit e317d13

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
@@ -287,7 +287,11 @@ fn do_connection_restart_behavior(persist: bool) {
287287
let node_id_b = node_b.node_id();
288288

289289
let node_addr_b = node_b.listening_addresses().unwrap().first().unwrap().clone();
290-
std::thread::sleep(std::time::Duration::from_secs(1));
290+
291+
while !node_b.status().is_listening {
292+
std::thread::sleep(std::time::Duration::from_millis(10));
293+
}
294+
291295
node_a.connect(node_id_b, node_addr_b, persist).unwrap();
292296

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

0 commit comments

Comments
 (0)