From 8e981db4d43bfd11f542cd56381f20b6201942fd Mon Sep 17 00:00:00 2001 From: John Coffey Date: Sun, 18 Oct 2026 14:21:54 -0700 Subject: [PATCH] Leave the startup domain check out of test builds #201 queues its first check of automatic domains' DKIM and ACME tasks 5 minutes after start. The JMAP suite runs longer than that, so the check gave its test domain DKIM keys mid-run and the store cleanup failed with leftover DkimSignature objects. Tests call check_tasks_for_domains themselves. --- crates/services/src/task_manager/scheduler.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/services/src/task_manager/scheduler.rs b/crates/services/src/task_manager/scheduler.rs index 1c07d98..4615dfa 100644 --- a/crates/services/src/task_manager/scheduler.rs +++ b/crates/services/src/task_manager/scheduler.rs @@ -53,6 +53,7 @@ enum Event { } // inbuxa: first check a few minutes after start, then daily +#[cfg_attr(feature = "test_mode", allow(dead_code))] const DOMAIN_TASK_CHECK_DELAY: Duration = Duration::from_secs(5 * 60); const DOMAIN_TASK_CHECK_INTERVAL: Duration = Duration::from_secs(24 * 60 * 60); @@ -152,7 +153,11 @@ pub fn spawn_task_scheduler(inner: Arc) { Event::StoreMetrics, ); - // inbuxa: automatic domains keep their DKIM and ACME tasks + // inbuxa: automatic domains keep their DKIM and ACME tasks. Not + // in test builds: a suite running past the first check would get + // DKIM keys for its test domains, and the tests call the check + // themselves. + #[cfg(not(feature = "test_mode"))] queue.schedule( Instant::now() + DOMAIN_TASK_CHECK_DELAY, Event::CheckDomainTasks, -- 2.54.0