~wallyworld/gwacl/fix-request-eof

« back to all changes in this revision

Viewing changes to helpers_factory_test.go

  • Committer: Tarmac
  • Author(s): Gavin Panella
  • Date: 2013-07-16 14:21:43 UTC
  • mfrom: (182.1.15 get-role)
  • Revision ID: tarmac-20130716142143-nu5le0j5a61wb6gw
[r=rvb][bug=][author=allenap] Rename the GetRole structure to PersistentVMRole, and ensure that it's suitable for non-lossy round-trips.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    }
37
37
    return true
38
38
}
 
39
 
 
40
// MakeRandomPort returns a port number between 1 and 65535 inclusive.
 
41
func MakeRandomPort() uint16 {
 
42
    port := uint16(random.Intn(1 << 16))
 
43
    if port == 0 {
 
44
        return MakeRandomPort()
 
45
    }
 
46
    return port
 
47
}