From b143371944532d819a219688b0d3b5f18939c2e9 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Thu, 14 Sep 2023 17:31:30 +0200 Subject: [PATCH] Fix transport_multicast_udp_only test --- io/zenoh-transport/tests/multicast_transport.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/io/zenoh-transport/tests/multicast_transport.rs b/io/zenoh-transport/tests/multicast_transport.rs index 8c719a8b58..28f69ef3b7 100644 --- a/io/zenoh-transport/tests/multicast_transport.rs +++ b/io/zenoh-transport/tests/multicast_transport.rs @@ -239,7 +239,11 @@ mod tests { println!("Closing transport with {endpoint}"); ztimeout!(peer01.transport.close()).unwrap(); assert!(peer01.manager.get_transports_multicast().await.is_empty()); - assert!(peer02.transport.get_peers().unwrap().is_empty()); + ztimeout!(async { + while !peer02.transport.get_peers().unwrap().is_empty() { + task::sleep(SLEEP_COUNT).await; + } + }); // Close the peer02 transport println!("Closing transport with {endpoint}");