You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
600 B
19 lines
600 B
package updatesocket
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestClientBoundsControlRequestsWithoutTimingOutUploads(t *testing.T) {
|
|
client := NewClient("/tmp/tera-updated-test.sock")
|
|
if client.controlClient.Timeout != 10*time.Second {
|
|
t.Fatalf("control timeout = %s, want 10s", client.controlClient.Timeout)
|
|
}
|
|
if client.uploadClient.Timeout != 0 {
|
|
t.Fatalf("upload timeout = %s, want request-context control", client.uploadClient.Timeout)
|
|
}
|
|
if client.controlClient.Transport != client.uploadClient.Transport {
|
|
t.Fatal("control and upload clients must share the bounded Unix transport")
|
|
}
|
|
}
|
|
|