From 720bb0c2970e38419c3800c7f5ff0b47c1e80773 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 4 May 2013 13:32:02 -0700 Subject: [PATCH] Better comments --- packer/rpc/port_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packer/rpc/port_test.go b/packer/rpc/port_test.go index fc2a731e0..7add6e8a2 100644 --- a/packer/rpc/port_test.go +++ b/packer/rpc/port_test.go @@ -15,11 +15,12 @@ func addrPort(address net.Addr) string { func Test_netListenerInRange(t *testing.T) { assert := asserts.NewTestingAsserts(t, true) - // Verify it selects an open port + // Open up port 10000 so that we take up a port L1000, err := net.Listen("tcp", ":10000") defer L1000.Close() assert.Nil(err, "should be able to bind to port 10000") + // Verify it selects an open port L := netListenerInRange(10000, 10005) assert.NotNil(L, "should have a listener") assert.Equal(addrPort(L.Addr()), "10001", "should bind to open port")