fix(slurm): add default 30s timeout to HTTP client
Replaces http.DefaultClient with a client that has a 30s timeout to prevent indefinite hangs when the Slurm REST API is unresponsive. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -20,7 +20,7 @@ func TestNewClient(t *testing.T) {
|
||||
t.Errorf("expected UserAgent %q, got %q", DefaultUserAgent, client.UserAgent)
|
||||
}
|
||||
if client.client == nil {
|
||||
t.Error("expected http.Client to be initialized (nil httpClient should default to http.DefaultClient)")
|
||||
t.Error("expected http.Client to be initialized (nil httpClient should create a client with default timeout)")
|
||||
}
|
||||
|
||||
_, err = NewClient("://invalid", nil)
|
||||
|
||||
Reference in New Issue
Block a user