mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 17:03:31 +00:00
test: allocate ports in blocks of 10
This commit is contained in:
parent
53c1c86ab3
commit
bc47972696
@ -224,7 +224,7 @@ func (a *TestAgent) consulConfig() *consul.Config {
|
|||||||
// Instead of relying on one set of ports to be sufficient we retry
|
// Instead of relying on one set of ports to be sufficient we retry
|
||||||
// starting the agent with different ports on port conflict.
|
// starting the agent with different ports on port conflict.
|
||||||
func pickRandomPorts(c *Config) {
|
func pickRandomPorts(c *Config) {
|
||||||
port := 1030 + int(rand.Int31n(64400))
|
port := 1030 + int(rand.Int31n(6440))*10
|
||||||
c.Ports.DNS = port + 1
|
c.Ports.DNS = port + 1
|
||||||
c.Ports.HTTP = port + 2
|
c.Ports.HTTP = port + 2
|
||||||
c.Ports.HTTPS = port + 3
|
c.Ports.HTTPS = port + 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user