test: Shutdown half-started agent before retrying

This commit is contained in:
Frank Schroeder 2017-05-22 23:58:22 +02:00
parent 584693482d
commit 8c1a668481
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 1 additions and 0 deletions

View File

@ -140,6 +140,7 @@ func (a *TestAgent) Start() *TestAgent {
// retry with different ports on port conflict
if strings.Contains(err.Error(), "bind: address already in use") {
a.Agent.Shutdown()
pickRandomPorts(a.Config)
r.Fatal("port conflict")
}