Commit 80b83770 authored by Filippo Valsorda's avatar Filippo Valsorda

crypto/tls: bump test timeouts from 1s to 1m for slow builders

The arm5 and mips builders are can't-send-a-packet-to-localhost-in-1s
slow apparently. 1m is less useful, but still better than an obscure
test timeout panic.

Fixes #28405

Change-Id: I2feeae6ea1b095114caccaab4f6709f405faebad
Reviewed-on: https://go-review.googlesource.com/c/145037
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent bc4a10d1
......@@ -384,12 +384,12 @@ func (test *clientTest) run(t *testing.T, write bool) {
}
for i, b := range flows {
if i%2 == 1 {
serverConn.SetWriteDeadline(time.Now().Add(1 * time.Second))
serverConn.SetWriteDeadline(time.Now().Add(1 * time.Minute))
serverConn.Write(b)
continue
}
bb := make([]byte, len(b))
serverConn.SetReadDeadline(time.Now().Add(1 * time.Second))
serverConn.SetReadDeadline(time.Now().Add(1 * time.Minute))
_, err := io.ReadFull(serverConn, bb)
if err != nil {
t.Fatalf("%s #%d: %s", test.name, i, err)
......@@ -1646,7 +1646,7 @@ func TestCloseClientConnectionOnIdleServer(t *testing.T) {
serverConn.Read(b[:])
client.Close()
}()
client.SetWriteDeadline(time.Now().Add(time.Second))
client.SetWriteDeadline(time.Now().Add(time.Minute))
err := client.Handshake()
if err != nil {
if err, ok := err.(net.Error); ok && err.Timeout() {
......
......@@ -615,12 +615,12 @@ func (test *serverTest) run(t *testing.T, write bool) {
}
for i, b := range flows {
if i%2 == 0 {
clientConn.SetWriteDeadline(time.Now().Add(1 * time.Second))
clientConn.SetWriteDeadline(time.Now().Add(1 * time.Minute))
clientConn.Write(b)
continue
}
bb := make([]byte, len(b))
clientConn.SetReadDeadline(time.Now().Add(1 * time.Second))
clientConn.SetReadDeadline(time.Now().Add(1 * time.Minute))
n, err := io.ReadFull(clientConn, bb)
if err != nil {
t.Fatalf("%s #%d: %s\nRead %d, wanted %d, got %x, wanted %x\n", test.name, i+1, err, n, len(bb), bb[:n], b)
......@@ -1434,7 +1434,7 @@ func TestCloseServerConnectionOnIdleClient(t *testing.T) {
clientConn.Write([]byte{'0'})
server.Close()
}()
server.SetReadDeadline(time.Now().Add(time.Second))
server.SetReadDeadline(time.Now().Add(time.Minute))
err := server.Handshake()
if err != nil {
if err, ok := err.(net.Error); ok && err.Timeout() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment