From 5a0e819ce26cf61141d5bc11f2aaf11c1c912e9f Mon Sep 17 00:00:00 2001 From: Adam Bratschi-Kaye Date: Wed, 2 Sep 2026 13:23:07 +0000 Subject: [PATCH] Fix flaky `response-body-fail` test --- test-programs/tests/http_server.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test-programs/tests/http_server.rs b/test-programs/tests/http_server.rs index a8e9ae9..a4c9283 100644 --- a/test-programs/tests/http_server.rs +++ b/test-programs/tests/http_server.rs @@ -151,6 +151,14 @@ fn http_server() -> Result<()> { // connection match ureq::get("http://127.0.0.1:8081/response-body-fail").call() { Err(ureq::Error::Io(_transport)) => {} + Ok(mut response) => match response.body_mut().read_to_vec() { + Err(ureq::Error::Io(_transport)) => {} + body => { + panic!( + "/response-body-fail expected io error, got: {response:?} with body {body:?}", + ); + } + }, result => { panic!("/response-body-fail expected io error, got: {result:?}") }