test: Shutdown half-started agent before retrying
This commit is contained in:
parent
d1ee368da9
commit
60a47addc7
|
@ -140,6 +140,7 @@ func (a *TestAgent) Start() *TestAgent {
|
||||||
|
|
||||||
// retry with different ports on port conflict
|
// retry with different ports on port conflict
|
||||||
if strings.Contains(err.Error(), "bind: address already in use") {
|
if strings.Contains(err.Error(), "bind: address already in use") {
|
||||||
|
a.Agent.Shutdown()
|
||||||
pickRandomPorts(a.Config)
|
pickRandomPorts(a.Config)
|
||||||
r.Fatal("port conflict")
|
r.Fatal("port conflict")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue