From bc4797269639d44be88124c6288755387d0fadd5 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 22 May 2017 14:11:34 +0200 Subject: [PATCH] test: allocate ports in blocks of 10 --- command/agent/testagent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/testagent.go b/command/agent/testagent.go index 45113353d7..54a10ecb97 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -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