]> Cypherpunks repositories - gostls13.git/commitdiff
cgi: make test code more readable
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 14 Nov 2011 21:12:08 +0000 (13:12 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 14 Nov 2011 21:12:08 +0000 (13:12 -0800)
R=rsc
CC=golang-dev
https://golang.org/cl/5375089

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

index 635a85521e7beecc56cc88ba7751c234cc40149e..4e977040c07f4f8a3d88aba3229de009c7206b78 100644 (file)
@@ -363,14 +363,13 @@ func TestCopyError(t *testing.T) {
        }
        conn.Close()
 
-       if tries := 0; childRunning() {
-               for tries < 15 && childRunning() {
-                       time.Sleep(50e6 * int64(tries))
-                       tries++
-               }
-               if childRunning() {
-                       t.Fatalf("post-conn.Close, expected child to be gone")
-               }
+       tries := 0
+       for tries < 15 && childRunning() {
+               time.Sleep(50e6 * int64(tries))
+               tries++
+       }
+       if childRunning() {
+               t.Fatalf("post-conn.Close, expected child to be gone")
        }
 }