]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: deflake another alloc test
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 4 Mar 2014 17:59:07 +0000 (09:59 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 4 Mar 2014 17:59:07 +0000 (09:59 -0800)
I have one machine where this 25 test run is flaky
and fails ("21 >= 21"), but 50 works everywhere.

LGTM=josharian
R=josharian
CC=golang-codereviews
https://golang.org/cl/67870053

src/pkg/net/http/serve_test.go

index 21cd67f9dca2a62093ad316abb6d6997372b23fb..c1ea537d85a02abd113bfdf68438b30c3c859723 100644 (file)
@@ -2235,8 +2235,8 @@ func TestResponseWriterWriteStringAllocs(t *testing.T) {
                        w.Write([]byte("Hello world"))
                }
        }))
-       before := testing.AllocsPerRun(25, func() { ht.rawResponse("GET / HTTP/1.0") })
-       after := testing.AllocsPerRun(25, func() { ht.rawResponse("GET /s HTTP/1.0") })
+       before := testing.AllocsPerRun(50, func() { ht.rawResponse("GET / HTTP/1.0") })
+       after := testing.AllocsPerRun(50, func() { ht.rawResponse("GET /s HTTP/1.0") })
        if int(after) >= int(before) {
                t.Errorf("WriteString allocs of %v >= Write allocs of %v", after, before)
        }