Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: TestRetryIdempotentRequestsOnError flake #18205

Closed
bradfitz opened this issue Dec 6, 2016 · 4 comments
Closed

net/http: TestRetryIdempotentRequestsOnError flake #18205

bradfitz opened this issue Dec 6, 2016 · 4 comments
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Dec 6, 2016

freebsd-amd64-race at 8adff32
https://build.golang.org/log/30e8693dc4f6f4a974cd3fe10b56a03cfc54536d

--- FAIL: TestRetryIdempotentRequestsOnError (0.28s)
	transport_test.go:2610: did not trigger any retries
FAIL
FAIL	net/http	7.277s
@bradfitz bradfitz added the Testing An issue that has been verified to require only test changes, not just a test failure. label Dec 6, 2016
@bradfitz bradfitz added this to the Go1.8Maybe milestone Dec 6, 2016
@bradfitz bradfitz self-assigned this Dec 6, 2016
@vcabbage
Copy link
Member

vcabbage commented Jan 8, 2017

I can somewhat reliably reproduce this on darwin/amd64 with the -race flag.

# go test -race -c
# while ./http.test -test.run=TestRetryIdempotentRequestsOnError -test.v; do; done
=== RUN   TestRetryIdempotentRequestsOnError
finished after 34 runs
--- PASS: TestRetryIdempotentRequestsOnError (0.09s)
PASS
=== RUN   TestRetryIdempotentRequestsOnError
finished after 90 runs
--- PASS: TestRetryIdempotentRequestsOnError (0.20s)
PASS
=== RUN   TestRetryIdempotentRequestsOnError
finished after 98 runs
--- PASS: TestRetryIdempotentRequestsOnError (0.20s)
PASS
=== RUN   TestRetryIdempotentRequestsOnError
--- FAIL: TestRetryIdempotentRequestsOnError (0.21s)
	transport_test.go:2623: did not trigger any retries
FAIL

After limiting GOMAXPROCS to 1 for the duration of the test (defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))), the test consistently triggered a retry on the first loop (ran ~100 test runs with same result).

Should I go ahead and open a CL with the change?

@bradfitz
Copy link
Contributor Author

bradfitz commented Jan 9, 2017

@vcabbage, changing GOMAXPROCS is a bit of a hack. I'd rather rewrite that whole test to be more fine-grained and thus faster and more reliable in the process.

@vcabbage
Copy link
Member

vcabbage commented Jan 9, 2017

@bradfitz Makes sense. FWIW, I ran across this when testing one of my CLs. Tripped me up because I thought I had introduced a bug.

@gopherbot
Copy link

CL https://golang.org/cl/35107 mentions this issue.

@golang golang locked and limited conversation to collaborators Jan 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants