GitHub user fumin opened a pull request: https://github.com/apache/thrift/pull/310
THRIFT-2880 Read the network address from the listener if available. Often in tests, the listening port of a test server is automatically selected by passing the zero port in the host, as in "127.0.0.1:0". An example of such behaviour is in the "httptest" package of the standard library: https://github.com/golang/go/blob/master/src/net/http/httptest/server.go#L65 As such, it is necessary to read from the listener itself to retrieve the actually listening port, as in https://github.com/golang/go/blob/master/src/net/http/httptest/server.go#L107 You can merge this pull request into a Git repository by running: $ git pull https://github.com/fumin/thrift thrift-2880 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/310.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #310 ---- commit 7449b691f400774d23a75eb3115921d8dfd1d515 Author: awaw fumin <awawfu...@gmail.com> Date: 2014-12-09T06:21:23Z Read the network address from the listener if available. Often in tests, the listening port of a test server is automatically selected by passing the zero port in the host, as in "127.0.0.1:0". An example of such behaviour is in the "httptest" package of the standard library: https://github.com/golang/go/blob/master/src/net/http/httptest/server.go#L65 As such, it is necessary to read from the listener itself to retrieve the actually listening port, as in https://github.com/golang/go/blob/master/src/net/http/httptest/server.go#L107 ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---