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: tests panic when on a poor network #6382
What steps will reproduce the problem? 1. Use a poor network connection. For example, on OS X, use the [Network Link Conditioner](http://stackoverflow.com/questions/9659382/installing-apples-network-link-conditioner-tool) and enable profile "Edge, Lossy Network". 2. go test net 3. Don't forget to turn off the Network Link Conditioner! I have wasted a few frustrated hours that way... :) What is the expected output? At worst, a few test failures, perhaps for time-sensitive tests. At best, all tests pass. What do you see instead? A slew of "too many open files" errors and a panic: https://gist.github.com/josharian/6553711 Which compiler are you using (5g, 6g, 8g, gccgo)? 6g Which operating system are you using? OS X 10.8.4 Which version are you using? (run 'go version') go version devel +238939762b61 Fri Sep 13 10:28:30 2013 +1000 darwin/amd64 Please provide any additional information below. `go test net` passes in the same conditions with Go 1.1.1. I'm not really sure whether this is a bug; perhaps it is an expected side effect of "Go becoming a better citizen" (http://www.honnef.co/go-tip/2013-08-30/). That said, it doesn't feel right--do I generally need to worry about panics when the network is poor?--so I thought I'd report it just in case.
No worries. That panic at testUnixAddr is intentional to report "guys, are you sure what are you doing right now on your node under the test?". Also you need to extend some per process resources such as maximum number of file descriptors because Russ added a pretty big dragon called TestDNSThreadLimit to nettest for Go 1.2. It consumes tons of threads and file descriptors, and leaves tons of worker threads during test. https://code.google.com/p/go/source/browse/src/pkg/net/dialgoogle_test.go#110
Status changed to Retracted.