Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(595)

Issue 6068046: net/http/httputil: Made reverseproxy test less flaky.

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by cranger
Modified:
13 years, 3 months ago
Reviewers:
bradfitz
CC:
bradfitz, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 6c3ed145bf76 https://code.google.com/p/go #

Total comments: 4

Patch Set 3 : diff -r 6c3ed145bf76 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -40 lines) Patch
M src/pkg/net/http/httputil/reverseproxy.go View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/net/http/httputil/reverseproxy_test.go View 1 2 3 chunks +18 lines, -34 lines 0 comments Download

Messages

Total messages: 5
bradfitz
Yeah, this seems like a better test. http://codereview.appspot.com/6068046/diff/2001/src/pkg/net/http/httputil/reverseproxy_test.go File src/pkg/net/http/httputil/reverseproxy_test.go (right): http://codereview.appspot.com/6068046/diff/2001/src/pkg/net/http/httputil/reverseproxy_test.go#newcode138 src/pkg/net/http/httputil/reverseproxy_test.go:138: for i ...
13 years, 3 months ago (2012-04-19 18:50:57 UTC) #1
cranger
http://codereview.appspot.com/6068046/diff/2001/src/pkg/net/http/httputil/reverseproxy_test.go File src/pkg/net/http/httputil/reverseproxy_test.go (right): http://codereview.appspot.com/6068046/diff/2001/src/pkg/net/http/httputil/reverseproxy_test.go#newcode138 src/pkg/net/http/httputil/reverseproxy_test.go:138: for i := 0; i < 10; i++ { ...
13 years, 3 months ago (2012-04-19 19:14:13 UTC) #2
bradfitz
LGTM
13 years, 3 months ago (2012-04-20 16:30:57 UTC) #3
bradfitz
LGTM
13 years, 3 months ago (2012-04-20 16:31:14 UTC) #4
bradfitz
13 years, 3 months ago (2012-04-20 16:31:29 UTC) #5
*** Submitted as http://code.google.com/p/go/source/detail?r=67c9d67aa825 ***

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
http://codereview.appspot.com/6068046

Committer: Brad Fitzpatrick <bradfitz@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b