Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

test: use tokio::time::sleep in async test poll loop (SonarCloud rust:S7488) (#8373)

Dylan M. Taylor9b18f57344ff
diff --git a/crates/automation/src/server.rs b/crates/automation/src/server.rs
index 850f70c69..46905daf3 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;
}
}
}