host tests: reuse the existing drain helper
ci / check (push) Successful in 8s

This commit is contained in:
agent-pool-9
2026-10-17 07:23:30 +00:00
parent 0995824c01
commit e8df22fe06
-9
View File
@@ -1000,15 +1000,6 @@ async fn ask_until(
.unwrap_or_else(|_| panic!("{actor} never gave the wanted answer")) .unwrap_or_else(|_| panic!("{actor} never gave the wanted answer"))
} }
/// Every message that arrives until the mailbox is quiet for `quiet`.
async fn drain(mailbox: &mut mpsc::Receiver<Envelope>, quiet: Duration) -> Vec<Envelope> {
let mut messages = Vec::new();
while let Ok(Some(message)) = tokio::time::timeout(quiet, mailbox.recv()).await {
messages.push(message);
}
messages
}
/// The `fs_changed` bodies among `messages` (all from `fs`). /// The `fs_changed` bodies among `messages` (all from `fs`).
fn fs_events(messages: Vec<Envelope>) -> Vec<Value> { fn fs_events(messages: Vec<Envelope>) -> Vec<Value> {
messages messages