diff options
Diffstat (limited to 'src/net/http/export_test.go')
| -rw-r--r-- | src/net/http/export_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/http/export_test.go b/src/net/http/export_test.go index f57e0c1585..1825acd9be 100644 --- a/src/net/http/export_test.go +++ b/src/net/http/export_test.go @@ -211,3 +211,9 @@ func (s *Server) ExportAllConnsIdle() bool { func (r *Request) WithT(t *testing.T) *Request { return r.WithContext(context.WithValue(r.Context(), tLogKey{}, t.Logf)) } + +func ExportSetH2GoawayTimeout(d time.Duration) (restore func()) { + old := http2goAwayTimeout + http2goAwayTimeout = d + return func() { http2goAwayTimeout = old } +} |
