Issue Description
Test cases often run HTTP server without specifying a port number, in order for the server to listen on any available port. Afterwards, the test case author peeks into the listener structure to find out the actual port number, using code similar to:
echoSrv.Listener.(*net.TCPListener).Addr().(*net.TCPAddr).Port
However, the method will not work with echo because the listener is a private extension of TCPListener, therefore it is impossible to find out actual port number being listened on. Consequently, it becomes difficult to run parallel tests against an echo HTTP server.
Therefore, please consider exporting the private TCPListener extension, or make a function dedicated to finding out the listener's port number.
Version/commit
master at e9f6780
Issue Description
Test cases often run HTTP server without specifying a port number, in order for the server to listen on any available port. Afterwards, the test case author peeks into the listener structure to find out the actual port number, using code similar to:
However, the method will not work with echo because the listener is a private extension of TCPListener, therefore it is impossible to find out actual port number being listened on. Consequently, it becomes difficult to run parallel tests against an echo HTTP server.
Therefore, please consider exporting the private TCPListener extension, or make a function dedicated to finding out the listener's port number.
Version/commit
master at e9f6780