Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.2
-
Linux Amazon AMI
-
Patch Available
Description
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
The pull request that fixes this is https://github.com/apache/thrift/pull/310