22 lines
592 B
Go
22 lines
592 B
Go
package carriernodeclient
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
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)
|
|
}
|
|
transport, ok := client.Transport.(*http.Transport)
|
|
if !ok {
|
|
t.Fatalf("transport type = %T, want *http.Transport", client.Transport)
|
|
}
|
|
if transport.ResponseHeaderTimeout != 10*time.Second {
|
|
t.Fatalf("response header timeout = %s, want 10s", transport.ResponseHeaderTimeout)
|
|
}
|
|
}
|