From 92df88ba70a727efee633887f946c91605e9f7a7 Mon Sep 17 00:00:00 2001 From: Yuyuan Yuan Date: Fri, 19 Apr 2024 20:10:40 +0800 Subject: [PATCH] Refine the feature flags (#948) --- io/zenoh-transport/tests/multicast_transport.rs | 1 + io/zenoh-transport/tests/unicast_openclose.rs | 1 + io/zenoh-transport/tests/unicast_transport.rs | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/io/zenoh-transport/tests/multicast_transport.rs b/io/zenoh-transport/tests/multicast_transport.rs index dae52742ee..87422daf2a 100644 --- a/io/zenoh-transport/tests/multicast_transport.rs +++ b/io/zenoh-transport/tests/multicast_transport.rs @@ -15,6 +15,7 @@ // Restricting to macos by default because of no IPv6 support // on GitHub CI actions on Linux and Windows. #[cfg(target_family = "unix")] +#[cfg(all(feature = "transport_compression", feature = "transport_udp"))] mod tests { use std::{ any::Any, diff --git a/io/zenoh-transport/tests/unicast_openclose.rs b/io/zenoh-transport/tests/unicast_openclose.rs index 483e81ade4..a671de14a8 100644 --- a/io/zenoh-transport/tests/unicast_openclose.rs +++ b/io/zenoh-transport/tests/unicast_openclose.rs @@ -24,6 +24,7 @@ use zenoh_transport::{ }; #[cfg(target_os = "linux")] +#[cfg(any(feature = "transport_tcp", feature = "transport_udp"))] use zenoh_util::net::get_ipv4_ipaddrs; const TIMEOUT: Duration = Duration::from_secs(60); diff --git a/io/zenoh-transport/tests/unicast_transport.rs b/io/zenoh-transport/tests/unicast_transport.rs index 7e736710d8..af1dedfbce 100644 --- a/io/zenoh-transport/tests/unicast_transport.rs +++ b/io/zenoh-transport/tests/unicast_transport.rs @@ -222,6 +222,11 @@ const SLEEP_COUNT: Duration = Duration::from_millis(10); const MSG_COUNT: usize = 1_000; const MSG_SIZE_ALL: [usize; 2] = [1_024, 131_072]; const MSG_SIZE_LOWLATENCY: [usize; 2] = [1_024, 65000]; +#[cfg(any( + feature = "transport_tcp", + feature = "transport_udp", + feature = "transport_unixsock-stream", +))] const MSG_SIZE_NOFRAG: [usize; 1] = [1_024]; // Transport Handler for the router