fix(test): use no_proxy client in detach signal test to prevent macOS timeout flakes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-04-08 12:51:34 -04:00
parent 90b373c366
commit 9ae606cfc1
No known key found for this signature in database
2 changed files with 13 additions and 4 deletions

View file

@ -580,10 +580,7 @@ mod tests {
.header("Content-Type", "application/json")
.body(terminal_run_state_response().to_string());
});
let client =
server_client::connect_server_target_direct(&format!("{}/api/v1", server.base_url()))
.await
.unwrap();
let client = server_client::ServerStoreClient::new_no_proxy(&server.base_url()).unwrap();
handle_detach_signal(&client, &run_id, true).await;

View file

@ -272,6 +272,18 @@ struct ArtifactBatchUploadEntry {
}
impl ServerStoreClient {
/// Build a client for tests that bypasses proxy discovery.
#[cfg(test)]
pub(crate) fn new_no_proxy(base_url: &str) -> Result<Self> {
let http_client = cli_http_client_builder().no_proxy().build()?;
let client = fabro_api::Client::new_with_client(base_url, http_client.clone());
Ok(Self {
client,
http_client,
base_url: base_url.to_string(),
})
}
pub(crate) fn clone_for_reuse(&self) -> Self {
self.clone()
}