1
0
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:
Dmitriy Vyukov 2012-02-17 11:42:02 +04:00
parent b8f465644c
commit 649f771b7b

View File

@ -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")
}