test: stagger retry attempts of TestAgent.Start

This commit is contained in:
Frank Schroeder 2017-05-31 11:33:25 +02:00
parent 5224699341
commit d14182c2de
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 3 additions and 1 deletions

View File

@ -161,7 +161,9 @@ func (a *TestAgent) Start() *TestAgent {
runtime.Goexit()
} else {
agent.Shutdown()
fmt.Println(id, a.Name, "retrying")
wait := time.Duration(rand.Int31n(2000)) * time.Millisecond
fmt.Println(id, a.Name, "retrying in", wait)
time.Sleep(wait)
}
}
if !a.NoInitialSync {