Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: deflake more tests using backoff #24580
In https://golang.org/cl/102397, I added some retry with backoff loops to some flaky net tests. It appears to have helped the build dashboard. I mentioned in the commit message that we could use the same approach for other flaky tests that we see. Looking at build.golang.org, it looks like TestLookupCNAME could use the same treatment.
This would be a great starter fix for someone looking to contribute. Or maybe @odeke-em? :)
Hmmm. Actually, looking at the dashboard, it appears that when the network gets really flaky, enough of these backoffs trigger that the package net tests time out instead. So it helps a little...but not enough. Sigh. We could increase the timeout for package net, perhaps? Better a slow pass than a fast flaky failure.
@bradfitz any opinions?
referenced this issue
Mar 29, 2018
The back off approach is fine. I'd also like to see some isolation between tests using the infrastructure and tests using the local system. FWIW, I have a plan to improve testing on DNS stub resolver after landing CL 102875, perhaps in Go 1.12 development cycle. It will use mock DNS servers for testing on connection setup and RR lookup APIs and will drop unnecessary dependence on the infrastructure.