Files

21 lines
592 B
Go
Raw Permalink Normal View History

2026-09-11 11:37:56 +02:00
package carriernodeclient
import (
"net/http"
"testing"
"time"
2026-09-11 11:37:56 +02:00
)
func TestHTTPClientBoundsResponseHeaderWaitWithoutLimitingStreams(t *testing.T) {
client := newHTTPClient()
if client.Timeout != 0 {
t.Fatalf("client total timeout = %s, want no total timeout for media streams", client.Timeout)
2026-09-11 11:37:56 +02:00
}
transport, ok := client.Transport.(*http.Transport)
if !ok {
t.Fatalf("transport type = %T, want *http.Transport", client.Transport)
2026-09-11 11:37:56 +02:00
}
if transport.ResponseHeaderTimeout != 10*time.Second {
t.Fatalf("response header timeout = %s, want 10s", transport.ResponseHeaderTimeout)
}
}