mirror of
https://github.com/refraction-networking/utls.git
synced 2025-04-04 12:37:35 +03:00
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: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
e58787c05a
commit
d2f8d62861
2 changed files with 6 additions and 6 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue