]> Cypherpunks repositories - gostls13.git/commit
net/http/httputil: Made reverseproxy test less flaky.
authorColby Ranger <cranger@google.com>
Fri, 20 Apr 2012 16:31:23 +0000 (09:31 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 20 Apr 2012 16:31:23 +0000 (09:31 -0700)
commita6d4471b2b38f4e865cdc4d31ae0de1e8db45a7b
tree79cf3af25e512d4d89b7d98bed5e14d4138426cd
parentdda6d6aa7087f51a59bbe60d7b73d170c715ddd0
net/http/httputil: Made reverseproxy test less flaky.

The reverseproxy test depended on the behavior of
runtime.NumGoroutines(), which makes no guarantee when
goroutines are reaped. Instead, modify the flushLoop()
to invoke a callback when it returns, so the exit
from the loop can be tested, instead of the number
of gorountines running.

R=bradfitz
CC=golang-dev
https://golang.org/cl/6068046
src/pkg/net/http/httputil/reverseproxy.go
src/pkg/net/http/httputil/reverseproxy_test.go