]> Cypherpunks repositories - gostls13.git/commitdiff
http: adjust test threshold for larger suse buffers
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 24 Aug 2011 12:09:49 +0000 (16:09 +0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 24 Aug 2011 12:09:49 +0000 (16:09 +0400)
My theory is that suse has larger TCP buffer sizes
by default.  I now check over 100MB, rather than over 2MB.
100MB is ~halfway between the 1MB limit and the 200MB
request that's attempted.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4926048

src/pkg/http/serve_test.go

index cfd71d4b4a94cd16107fe88f81f71ae966ed744b..08925faa0e1bd118279dfdd382e10bb6da630f7c 100644 (file)
@@ -944,7 +944,7 @@ func TestRequestBodyLimit(t *testing.T) {
        // the remote side hung up on us before we wrote too much.
        _, _ = DefaultClient.Do(req)
 
-       if nWritten > limit*2 {
+       if nWritten > limit*100 {
                t.Errorf("handler restricted the request body to %d bytes, but client managed to write %d",
                        limit, nWritten)
        }