mirror of https://github.com/golang/go.git
net/http, net/http/httputil: fix TestChunkReaderAllocs failure when GOMAXPROCS > 1
R=fullung, bradfitz, dave CC=golang-dev https://golang.org/cl/6846081
This commit is contained in:
parent
4bf261f9e3
commit
7bce6f9386
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue