Commits

minux  committed 1315abc Draft

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

R=fullung, bradfitz, dave
CC=golang-dev
http://codereview.appspot.com/6846081

  • Participants
  • Parent commits 2524ef4

Comments (0)

Files changed (2)

File src/pkg/net/http/chunked_test.go

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

File src/pkg/net/http/httputil/chunked_test.go

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