fix(core): harden download lifecycle and scheduling

This commit is contained in:
NimBold
2026-06-22 11:19:18 +03:30
parent d535bdac8f
commit 06b14df307
38 changed files with 1257 additions and 428 deletions
+6 -1
View File
@@ -438,7 +438,12 @@ async fn cancel_removes_partial_file_without_terminal_success_event() {
.await
.unwrap();
wait_for_progress(&mut events, id, 256 * 1024).await;
coordinator.send(DownloadCmd::Cancel(id)).await.unwrap();
let (cancelled_tx, cancelled_rx) = tokio::sync::oneshot::channel();
coordinator
.send(DownloadCmd::CancelWithAck(id, cancelled_tx))
.await
.unwrap();
cancelled_rx.await.unwrap();
tokio::time::timeout(TEST_TIMEOUT, async {
while output_path.exists() {