diff options
| author | David Symonds <dsymonds@golang.org> | 2011-07-18 12:59:16 +1000 |
|---|---|---|
| committer | David Symonds <dsymonds@golang.org> | 2011-07-18 12:59:16 +1000 |
| commit | a8e0035bd346beebb9d6bb5b43cb99ca901dd47a (patch) | |
| tree | a619400f8a8f9b29b02c7484d0490ce94e42fbc6 /src | |
| parent | 08e47ebb7d01a8df9e67491f5ab1b191923a1aab (diff) | |
| download | go-a8e0035bd346beebb9d6bb5b43cb99ca901dd47a.tar.xz | |
http: drain the pipe output in TestHandlerPanic to avoid logging deadlock.
R=r
CC=golang-dev
https://golang.org/cl/4756047
Diffstat (limited to 'src')
| -rw-r--r-- | src/pkg/http/serve_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/http/serve_test.go b/src/pkg/http/serve_test.go index 2ba4a168bc..9c8a122ff0 100644 --- a/src/pkg/http/serve_test.go +++ b/src/pkg/http/serve_test.go @@ -820,6 +820,7 @@ func TestHandlerPanic(t *testing.T) { go func() { buf := make([]byte, 1024) _, err := pr.Read(buf) + pr.Close() if err != nil { t.Fatal(err) } @@ -829,7 +830,7 @@ func TestHandlerPanic(t *testing.T) { case <-done: return case <-time.After(5e9): - t.Error("expected server handler to log an error") + t.Fatal("expected server handler to log an error") } } |
