mirror of
https://github.com/golang/go
synced 2024-11-22 06:24:38 -07:00
net/rpc: fix spurious panic in test
The panic happens if -benchtime flag is specified: go test -bench=EndToEndAsyncHTTP -benchtime=120 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5677075
This commit is contained in:
parent
b8f465644c
commit
649f771b7b
@ -387,12 +387,12 @@ func (WriteFailCodec) WriteRequest(*Request, interface{}) error {
|
||||
}
|
||||
|
||||
func (WriteFailCodec) ReadResponseHeader(*Response) error {
|
||||
time.Sleep(120 * time.Second)
|
||||
select {}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
func (WriteFailCodec) ReadResponseBody(interface{}) error {
|
||||
time.Sleep(120 * time.Second)
|
||||
select {}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user