Please take a look.
https://codereview.appspot.com/82940044/diff/1/state/api/client_test.go File state/api/client_test.go (left):
https://codereview.appspot.com/82940044/diff/1/state/api/client_test.go#oldcode75 state/api/client_test.go:75: c.Assert(err, gc.IsNil) Had to remove the assert as it now returned a "use of closed connection" error, and we don't actually care about the error.
https://codereview.appspot.com/82940044/diff/1/state/api/client_test.go File state/api/client_test.go (right):
https://codereview.appspot.com/82940044/diff/1/state/api/client_test.go#newcode69 state/api/client_test.go:69: lis, err := net.Listen("tcp", ":0") On 2014/04/01 04:48:36, axw wrote: > Sorry, just realised: please defer lis.Close() after checking the error.
ok
https://codereview.appspot.com/82940044/diff/1/state/api/client_test.go#newcode72 state/api/client_test.go:72: url := fmt.Sprintf("http://localhost:%d", port) On 2014/04/01 04:47:19, axw wrote: > This can be simplified to: > fmt.Sprintf("http://%s", lis.Addr())
Done.
https://codereview.appspot.com/82940044/
« Back to merge proposal
Please take a look.
https:/ /codereview. appspot. com/82940044/ diff/1/ state/api/ client_ test.go client_ test.go (left):
File state/api/
https:/ /codereview. appspot. com/82940044/ diff/1/ state/api/ client_ test.go# oldcode75 client_ test.go: 75: c.Assert(err, gc.IsNil)
state/api/
Had to remove the assert as it now returned a "use of closed connection"
error, and we don't actually care about the error.
https:/ /codereview. appspot. com/82940044/ diff/1/ state/api/ client_ test.go client_ test.go (right):
File state/api/
https:/ /codereview. appspot. com/82940044/ diff/1/ state/api/ client_ test.go# newcode69 client_ test.go: 69: lis, err := net.Listen("tcp", ":0")
state/api/
On 2014/04/01 04:48:36, axw wrote:
> Sorry, just realised: please defer lis.Close() after checking the
error.
ok
https:/ /codereview. appspot. com/82940044/ diff/1/ state/api/ client_ test.go# newcode72 client_ test.go: 72: url := fmt.Sprintf("http:// localhost:%d", %s", lis.Addr())
state/api/
port)
On 2014/04/01 04:47:19, axw wrote:
> This can be simplified to:
> fmt.Sprintf("http://
Done.
https:/ /codereview. appspot. com/82940044/