Skip to content

Commit b052f15

Browse files
committed
Use is_listening flag in connection_restart_behavior test
1 parent 0396fc5 commit b052f15

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

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

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

0 commit comments

Comments
 (0)