S011: relink tests wait for the saved parts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-25 07:47:40 -06:00
commit 8b7fac1283

View file

@ -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