mirror of https://github.com/golang/go.git
net/http: add ResponseController http2 request without body read deadline test
Requires CL 464936 For #58237
This commit is contained in:
parent
5abae02d27
commit
30a10909b0
|
|
@ -326,3 +326,18 @@ func testResponseControllerEnableFullDuplex(t *testing.T, mode testMode) {
|
||||||
}
|
}
|
||||||
pw.Close()
|
pw.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestIssue58237(t *testing.T) {
|
||||||
|
cst := newClientServerTest(t, http2Mode, HandlerFunc(func(w ResponseWriter, req *Request) {
|
||||||
|
ctl := NewResponseController(w)
|
||||||
|
if err := ctl.SetReadDeadline(time.Now().Add(1 * time.Millisecond)); err != nil {
|
||||||
|
t.Errorf("ctl.SetReadDeadline() = %v, want nil", err)
|
||||||
|
}
|
||||||
|
time.Sleep(10 * time.Millisecond)
|
||||||
|
}))
|
||||||
|
res, err := cst.c.Get(cst.ts.URL)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
res.Body.Close()
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue