Skip to content

Commit

Permalink
clippy fix, internal config global for liveliness test
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Dec 10, 2024
1 parent 7111b54 commit 857ba11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 50 deletions.
52 changes: 2 additions & 50 deletions zenoh/tests/liveliness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
// Contributors:
// ZettaScale Zenoh Team, <[email protected]>
//
#[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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 857ba11

Please sign in to comment.