mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-15 23:32:46 +00:00
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:
parent
90b373c366
commit
9ae606cfc1
2 changed files with 13 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue