From f20faeb5ae9ef84507cf4f3d06f2ea18f59d7816 Mon Sep 17 00:00:00 2001 From: astar76 Date: Wed, 25 Nov 2026 01:21:35 -0600 Subject: [PATCH] S005: exact byte counts in a resume test Co-Authored-By: Claude Opus 5.5 --- crates/core/tests/http.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/core/tests/http.rs b/crates/core/tests/http.rs index 6178553..56fb405 100644 --- a/crates/core/tests/http.rs +++ b/crates/core/tests/http.rs @@ -273,7 +273,7 @@ async fn servers_without_ranges_or_length() { #[tokio::test(flavor = "multi_thread")] async fn no_ranges_starts_over() { - let b = Bench::new().await; + let mut b = Bench::new().await; let path = "/data/10/4m/o.bin"; let id = b.add(&format!("{path}?ignore_range=1")); b.server.set_faults(path, slow(2 * MB)); @@ -288,10 +288,12 @@ async fn no_ranges_starts_over() { b.half(id).await; b.server.clear_all_faults(); b.server.clear_log(); + b.cap = 1; let done = b.run(id).await.unwrap(); assert_eq!(done, b.folder().join("o (1).bin")); b.check(&done, 10, 4 * MB); assert!(b.sent(path) < 4 * MB); + b.cap = 4; // Started with ranges, and now there are none: nothing is thrown away. let path = "/data/10/8m/r.bin";