Merge pull request #3733 from yichengq/fix-wait-timeout

pkg/transport: extend wait timeout for write
This commit is contained in:
Xiang Li 2015-10-22 13:07:14 -04:00
commit 2feccd3fa4
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,8 @@ func TestReadWriteTimeoutDialer(t *testing.T) {
select {
case <-done:
case <-time.After(d.wtimeoutd * 10):
// It waits 1s more to avoid delay in low-end system.
case <-time.After(d.wtimeoutd*10 + time.Second):
t.Fatal("wait timeout")
}

View File

@ -76,7 +76,8 @@ func TestWriteReadTimeoutListener(t *testing.T) {
select {
case <-done:
case <-time.After(wln.wtimeoutd * 10):
// It waits 1s more to avoid delay in low-end system.
case <-time.After(wln.wtimeoutd*10 + time.Second):
t.Fatal("wait timeout")
}