Skip to content

Commit 208f306

Browse files
committed
http3: increase handshake timeout
Increase the QUIC handshake timeout for std tests to avoid flakes on slow builders. For golang/go#78737 Change-Id: I8d7ccfb3c8b55e0b0b4ab0b7b22dcd0a6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/net/+/774800 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Damien Neil <dneil@google.com>
1 parent 49810da commit 208f306

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

http3/http3.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@ package http3
66

77
import (
88
"net/http"
9+
"time"
910
_ "unsafe" // for linkname
1011

1112
. "golang.org/x/net/internal/http3"
1213
"golang.org/x/net/quic"
1314
)
1415

16+
// Be extra generous with the handshake timeout. On some builders, the default
17+
// handshake timeout seems to be insufficient, causing rare test flakes.
18+
const handshakeTimeout = 1 * time.Minute
19+
1520
//go:linkname registerHTTP3Server net/http_test.registerHTTP3Server
1621
func registerHTTP3Server(s *http.Server) <-chan *quic.Endpoint {
1722
endpointCh := make(chan *quic.Endpoint)
@@ -21,6 +26,7 @@ func registerHTTP3Server(s *http.Server) <-chan *quic.Endpoint {
2126
endpointCh <- e
2227
return e, err
2328
},
29+
QUICConfig: &quic.Config{HandshakeTimeout: handshakeTimeout},
2430
})
2531
return endpointCh
2632
}
@@ -34,6 +40,7 @@ func registerHTTP3Transport(tr *http.Transport) <-chan *quic.Endpoint {
3440
endpointCh <- e
3541
return e, err
3642
},
43+
QUICConfig: &quic.Config{HandshakeTimeout: handshakeTimeout},
3744
})
3845
return endpointCh
3946
}

0 commit comments

Comments
 (0)