test: allocate ports in blocks of 10

This commit is contained in:
Frank Schroeder 2017-05-22 14:11:34 +02:00
parent 26474ce9c2
commit e8651261f9
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ func (a *TestAgent) consulConfig() *consul.Config {
// Instead of relying on one set of ports to be sufficient we retry
// starting the agent with different ports on port conflict.
func pickRandomPorts(c *Config) {
port := 1030 + int(rand.Int31n(64400))
port := 1030 + int(rand.Int31n(6440))*10
c.Ports.DNS = port + 1
c.Ports.HTTP = port + 2
c.Ports.HTTPS = port + 3