*: make dial timeout configurable

Dial timeout is set shorter because
1. etcd is supposed to work in good environment, and the new value is long
enough
2. shorter dial timeout makes dial fail faster, which is good for
performance
This commit is contained in:
Yicheng Qin
2015-02-12 22:23:10 -08:00
parent 55cd03ff4b
commit 2c94e2d771
5 changed files with 6 additions and 5 deletions

View File

@ -623,7 +623,7 @@ func mustNewHTTPClient(t *testing.T, eps []string) client.Client {
}
func mustNewTransport(t *testing.T) *http.Transport {
tr, err := transport.NewTimeoutTransport(transport.TLSInfo{}, rafthttp.ConnReadTimeout, rafthttp.ConnWriteTimeout)
tr, err := transport.NewTimeoutTransport(transport.TLSInfo{}, rafthttp.DialTimeout, rafthttp.ConnReadTimeout, rafthttp.ConnWriteTimeout)
if err != nil {
t.Fatal(err)
}