diff --git a/zenoh/tests/liveliness.rs b/zenoh/tests/liveliness.rs index f0b9fc208..b88ac922b 100644 --- a/zenoh/tests/liveliness.rs +++ b/zenoh/tests/liveliness.rs @@ -11,10 +11,10 @@ // Contributors: // ZettaScale Zenoh Team, // -#[cfg(feature = "internal_config")] +#![cfg(feature = "internal_config")] + use zenoh_core::ztimeout; -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_clique() { use std::time::Duration; @@ -77,7 +77,6 @@ async fn test_liveliness_subscriber_clique() { peer2.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_query_clique() { use std::time::Duration; @@ -134,7 +133,6 @@ async fn test_liveliness_query_clique() { peer2.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_brokered() { use std::time::Duration; @@ -213,7 +211,6 @@ async fn test_liveliness_subscriber_brokered() { client2.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_query_brokered() { use std::time::Duration; @@ -284,7 +281,6 @@ async fn test_liveliness_query_brokered() { client2.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_local() { use std::time::Duration; @@ -327,7 +323,6 @@ async fn test_liveliness_subscriber_local() { peer.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_query_local() { use std::time::Duration; @@ -362,7 +357,6 @@ async fn test_liveliness_query_local() { peer.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_after_close() { use std::time::Duration; @@ -421,7 +415,6 @@ async fn test_liveliness_after_close() { /// ------------------------------------------------------- /// DOUBLE CLIENT /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_client_before() { use std::time::Duration; @@ -516,7 +509,6 @@ async fn test_liveliness_subscriber_double_client_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_client_middle() { use std::time::Duration; @@ -614,7 +606,6 @@ async fn test_liveliness_subscriber_double_client_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_client_after() { use std::time::Duration; @@ -714,7 +705,6 @@ async fn test_liveliness_subscriber_double_client_after() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_client_history_before() { use std::time::Duration; @@ -817,7 +807,6 @@ async fn test_liveliness_subscriber_double_client_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_client_history_middle() { use std::time::Duration; @@ -920,7 +909,6 @@ async fn test_liveliness_subscriber_double_client_history_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_client_history_after() { use std::time::Duration; @@ -1025,7 +1013,6 @@ async fn test_liveliness_subscriber_double_client_history_after() { /// ------------------------------------------------------- /// DOUBLE PEER /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_peer_before() { use std::time::Duration; @@ -1114,7 +1101,6 @@ async fn test_liveliness_subscriber_double_peer_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_peer_middle() { use std::time::Duration; @@ -1206,7 +1192,6 @@ async fn test_liveliness_subscriber_double_peer_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_peer_after() { use std::time::Duration; @@ -1300,7 +1285,6 @@ async fn test_liveliness_subscriber_double_peer_after() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_peer_history_before() { use std::time::Duration; @@ -1403,7 +1387,6 @@ async fn test_liveliness_subscriber_double_peer_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_peer_history_middle() { use std::time::Duration; @@ -1506,7 +1489,6 @@ async fn test_liveliness_subscriber_double_peer_history_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_peer_history_after() { use std::time::Duration; @@ -1611,7 +1593,6 @@ async fn test_liveliness_subscriber_double_peer_history_after() { /// ------------------------------------------------------- /// DOUBLE ROUTER /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_router_before() { use std::time::Duration; @@ -1711,7 +1692,6 @@ async fn test_liveliness_subscriber_double_router_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_router_middle() { use std::time::Duration; @@ -1814,7 +1794,6 @@ async fn test_liveliness_subscriber_double_router_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_router_after() { use std::time::Duration; @@ -1919,7 +1898,6 @@ async fn test_liveliness_subscriber_double_router_after() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_router_history_before() { use std::time::Duration; @@ -2027,7 +2005,6 @@ async fn test_liveliness_subscriber_double_router_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_router_history_middle() { use std::time::Duration; @@ -2135,7 +2112,6 @@ async fn test_liveliness_subscriber_double_router_history_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_router_history_after() { use std::time::Duration; @@ -2245,7 +2221,6 @@ async fn test_liveliness_subscriber_double_router_history_after() { /// ------------------------------------------------------- /// DOUBLE CLIENT VIA PEER /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_clientviapeer_before() { use std::time::Duration; @@ -2359,7 +2334,6 @@ async fn test_liveliness_subscriber_double_clientviapeer_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_clientviapeer_middle() { use std::time::Duration; @@ -2476,7 +2450,6 @@ async fn test_liveliness_subscriber_double_clientviapeer_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_clientviapeer_after() { use std::time::Duration; @@ -2595,7 +2568,6 @@ async fn test_liveliness_subscriber_double_clientviapeer_after() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_clientviapeer_history_before() { use std::time::Duration; @@ -2718,7 +2690,6 @@ async fn test_liveliness_subscriber_double_clientviapeer_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_clientviapeer_history_middle() { use std::time::Duration; @@ -2841,7 +2812,6 @@ async fn test_liveliness_subscriber_double_clientviapeer_history_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subscriber_double_clientviapeer_history_after() { use std::time::Duration; @@ -2966,7 +2936,6 @@ async fn test_liveliness_subscriber_double_clientviapeer_history_after() { /// ------------------------------------------------------- /// SUBGET CLIENT /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_client_before() { use std::time::Duration; @@ -3059,7 +3028,6 @@ async fn test_liveliness_subget_client_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_client_middle() { use std::time::Duration; @@ -3157,7 +3125,6 @@ async fn test_liveliness_subget_client_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_client_history_before() { use std::time::Duration; @@ -3254,7 +3221,6 @@ async fn test_liveliness_subget_client_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_client_history_middle() { use std::time::Duration; @@ -3356,7 +3322,6 @@ async fn test_liveliness_subget_client_history_middle() { /// ------------------------------------------------------- /// SUBGET PEER /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_peer_before() { use std::time::Duration; @@ -3449,7 +3414,6 @@ async fn test_liveliness_subget_peer_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_peer_middle() { use std::time::Duration; @@ -3547,7 +3511,6 @@ async fn test_liveliness_subget_peer_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_peer_history_before() { use std::time::Duration; @@ -3644,7 +3607,6 @@ async fn test_liveliness_subget_peer_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_peer_history_middle() { use std::time::Duration; @@ -3746,7 +3708,6 @@ async fn test_liveliness_subget_peer_history_middle() { /// ------------------------------------------------------- /// SUBGET ROUTER /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_router_before() { use std::time::Duration; @@ -3844,7 +3805,6 @@ async fn test_liveliness_subget_router_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_router_middle() { use std::time::Duration; @@ -3947,7 +3907,6 @@ async fn test_liveliness_subget_router_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_router_history_before() { use std::time::Duration; @@ -4049,7 +4008,6 @@ async fn test_liveliness_subget_router_history_before() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_subget_router_history_middle() { use std::time::Duration; @@ -4153,7 +4111,6 @@ async fn test_liveliness_subget_router_history_middle() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_regression_1() { use std::time::Duration; @@ -4237,7 +4194,6 @@ async fn test_liveliness_regression_1() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_regression_2() { use std::time::Duration; @@ -4331,7 +4287,6 @@ async fn test_liveliness_regression_2() { peer_sub.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_regression_2_history() { use std::time::Duration; @@ -4432,7 +4387,6 @@ async fn test_liveliness_regression_2_history() { peer_sub.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_regression_3() { use std::time::Duration; @@ -4538,7 +4492,6 @@ async fn test_liveliness_regression_3() { router.close().await.unwrap(); } -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_issue_1470() { // https://github.com/eclipse-zenoh/zenoh/issues/1470 @@ -4722,7 +4675,6 @@ async fn test_liveliness_issue_1470() { /// ------------------------------------------------------- /// DOUBLE UNDECLARE CLIQUE /// ------------------------------------------------------- -#[cfg(feature = "internal_config")] #[tokio::test(flavor = "multi_thread", worker_threads = 4)] async fn test_liveliness_double_undeclare_clique() { use std::time::Duration; diff --git a/zenoh/tests/matching.rs b/zenoh/tests/matching.rs index 503c1f5e4..c5cab1dff 100644 --- a/zenoh/tests/matching.rs +++ b/zenoh/tests/matching.rs @@ -12,6 +12,7 @@ // ZettaScale Zenoh Team, // #![cfg(feature = "unstable")] +#![cfg(feature = "internal_config")] use std::time::Duration;