From faa16900c52698954887640dde49878a18028bf1 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 21 Oct 2026 17:18:48 -0400 Subject: [PATCH] test: use tokio::time::sleep in async test poll loop (SonarCloud rust:S7488) The multi-thread #[tokio::test] polled with a blocking std::thread::sleep, stalling a runtime worker. Use tokio::time::sleep(..).await instead. --- crates/automation/src/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/automation/src/server.rs b/crates/automation/src/server.rs index 850f70c69e..46905daf38 100644 --- a/crates/automation/src/server.rs +++ b/crates/automation/src/server.rs @@ -1197,7 +1197,7 @@ mod tests { break; } assert!(t.elapsed().as_secs() < 60, "doc_inspect never saw the finished job: {inspected}"); - std::thread::sleep(std::time::Duration::from_millis(5)); + tokio::time::sleep(std::time::Duration::from_millis(5)).await; } } }