]> Cypherpunks repositories - gostls13.git/commitdiff
net/http/cgi: maybe improve darwin test reliability
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 4 Mar 2013 16:13:39 +0000 (08:13 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 4 Mar 2013 16:13:39 +0000 (08:13 -0800)
Use a 17 MB payload instead of a 1 MB payload, since
OS X can apparently buffer up to 16 MB in its pipes.

Fixes #4958 maybe

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/7453049

src/pkg/net/http/cgi/host_test.go
src/pkg/net/http/cgi/testdata/test.cgi

index 2359fd9c278d04cde7919c52d267d8d94b87bf97..8c16e6897f27e15ef2557a909a373781dac341f3 100644 (file)
@@ -301,9 +301,6 @@ func TestCopyError(t *testing.T) {
        if runtime.GOOS == "windows" {
                t.Skipf("skipping test on %q", runtime.GOOS)
        }
-       if runtime.GOOS == "darwin" {
-               t.Skipf("issue 4958 - skipping test on darwin")
-       }
        h := &Handler{
                Path: "testdata/test.cgi",
                Root: "/test.cgi",
index 1b25bc29996993cd3f3127ec11173f62c0903db6..3214df6f004556377cf5eb6336e4d9d3495c5f99 100755 (executable)
@@ -24,7 +24,8 @@ print "X-Test-Header: X-Test-Value\r\n";
 print "\r\n";
 
 if ($params->{"bigresponse"}) {
-    for (1..1024) {
+    # 17 MB, for OS X: golang.org/issue/4958
+    for (1..(17 * 1024)) {
         print "A" x 1024, "\r\n";
     }
     exit 0;