From b922301166cf5a550b8f2c7e1b49219ba7c891aa Mon Sep 17 00:00:00 2001 From: Lutz Lange Date: Thu, 15 Oct 2026 11:23:41 +0200 Subject: [PATCH] test(agent): use a fresh HTTP client for the continued GitHub device page The test aborts the first device page server, starts the continued page on the same port and requested it with the same client, which may still pool a keep-alive connection to the aborted server; a request sent on it is reset ("Connection reset by peer" in CI). Use a fresh client for the continued page. Co-Authored-By: Claude Opus 5.5 --- crates/agent/src/github_oauth.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/agent/src/github_oauth.rs b/crates/agent/src/github_oauth.rs index b154f293..25a37113 100644 --- a/crates/agent/src/github_oauth.rs +++ b/crates/agent/src/github_oauth.rs @@ -437,6 +437,10 @@ mod tests { continued_url, format!("{}/", redirect.origin().ascii_serialization()) ); + // A fresh client: the first one may still pool a keep-alive + // connection to the aborted server on this same port, and a request + // sent on it is reset. + let client = reqwest::Client::new(); assert_eq!( client .get(format!("{continued_url}flow-ready"))