diff --git a/crates/common/src/manager/defaults.rs b/crates/common/src/manager/defaults.rs index 1dd6ceaa..26211b2d 100644 --- a/crates/common/src/manager/defaults.rs +++ b/crates/common/src/manager/defaults.rs @@ -613,6 +613,8 @@ async fn insert_safe_defaults(bp: &mut Bootstrap) -> trc::Result<()> { /// of never; spam training samples are kept 90 days instead of 180; Pyzor, /// which sends a digest of each message's text to a public server, is off; /// delivery history is kept 14 days instead of 30. +// Test builds leave out the caller (`cfg(not(feature = "test_mode"))`). +#[cfg_attr(feature = "test_mode", allow(dead_code))] fn new_install_privacy_defaults( security: &mut Security, classifier: &mut SpamClassifier, diff --git a/crates/http/src/live.rs b/crates/http/src/live.rs index 02b6f8b3..7cf067ca 100644 --- a/crates/http/src/live.rs +++ b/crates/http/src/live.rs @@ -39,7 +39,7 @@ struct Slot; impl Slot { fn take() -> Option { STREAMS - .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |n| { + .try_update(Ordering::SeqCst, Ordering::SeqCst, |n| { (n < MAX_STREAMS).then_some(n + 1) }) .ok() diff --git a/crates/services/src/task_manager/scheduler.rs b/crates/services/src/task_manager/scheduler.rs index 72e6a884..16a025b0 100644 --- a/crates/services/src/task_manager/scheduler.rs +++ b/crates/services/src/task_manager/scheduler.rs @@ -48,7 +48,9 @@ enum Event { EvaluateAlerts, // inbuxa: settings-reorg: probe the other nodes' ports ProbePeerPorts, - // inbuxa: re-queue DKIM rotation and ACME renewal tasks a domain is missing + // inbuxa: re-queue DKIM rotation and ACME renewal tasks a domain is missing. + // Test builds never schedule it (`cfg(not(feature = "test_mode"))`). + #[cfg_attr(feature = "test_mode", allow(dead_code))] CheckDomainTasks, } diff --git a/tests/src/system/front_ends.rs b/tests/src/system/front_ends.rs index ef9e079e..b1f80716 100644 --- a/tests/src/system/front_ends.rs +++ b/tests/src/system/front_ends.rs @@ -153,7 +153,7 @@ fn refusal(response: &Value) -> String { #[ignore] #[tokio::test(flavor = "multi_thread")] pub async fn front_ends_tests() { - let mut test = TestServerBuilder::new("front_ends_tests") + let test = TestServerBuilder::new("front_ends_tests") .await .with_default_listeners() .await diff --git a/tests/src/system/sharing_policy.rs b/tests/src/system/sharing_policy.rs index c11c0b69..e12e9b51 100644 --- a/tests/src/system/sharing_policy.rs +++ b/tests/src/system/sharing_policy.rs @@ -95,7 +95,7 @@ impl Account { #[ignore] #[tokio::test(flavor = "multi_thread")] pub async fn sharing_policy_tests() { - let mut test = TestServerBuilder::new("sharing_policy_tests") + let test = TestServerBuilder::new("sharing_policy_tests") .await .with_default_listeners() .await