Commit 7bce6f93 authored by Shenghou Ma's avatar Shenghou Ma

net/http, net/http/httputil: fix TestChunkReaderAllocs failure when GOMAXPROCS > 1

R=fullung, bradfitz, dave
CC=golang-dev
https://golang.org/cl/6846081
parent 4bf261f9
......@@ -42,6 +42,8 @@ func TestChunk(t *testing.T) {
}
func TestChunkReaderAllocs(t *testing.T) {
// temporarily set GOMAXPROCS to 1 as we are testing memory allocations
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
var buf bytes.Buffer
w := newChunkedWriter(&buf)
a, b, c := []byte("aaaaaa"), []byte("bbbbbbbbbbbb"), []byte("cccccccccccccccccccccccc")
......
......@@ -44,6 +44,8 @@ func TestChunk(t *testing.T) {
}
func TestChunkReaderAllocs(t *testing.T) {
// temporarily set GOMAXPROCS to 1 as we are testing memory allocations
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
var buf bytes.Buffer
w := NewChunkedWriter(&buf)
a, b, c := []byte("aaaaaa"), []byte("bbbbbbbbbbbb"), []byte("cccccccccccccccccccccccc")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment