diff --git a/crates/core/tests/relink.rs b/crates/core/tests/relink.rs index 058989d..f6798b8 100644 --- a/crates/core/tests/relink.rs +++ b/crates/core/tests/relink.rs @@ -94,7 +94,8 @@ impl Bench { let id = self.run(Command::Add(Box::new(task))).await; self.until(id, "half", |v| v.downloaded >= LEN as u64 / 2).await; self.run(Command::Pause(id)).await; - self.until(id, "stopped", |v| v.connections == 0).await; + // The connections end first, then what came is saved: a moment later where the disk is slow. + self.until(id, "stopped", |v| v.connections == 0 && v.task.downloaded >= v.downloaded).await; self.server.clear_all_faults(); self.server.clear_log(); id