test: stagger retry attempts of TestAgent.Start

This commit is contained in:
Frank Schroeder 2017-05-31 11:33:25 +02:00
parent bdfed817ee
commit f89ae9f7e7
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD

View File

@ -161,7 +161,9 @@ func (a *TestAgent) Start() *TestAgent {
runtime.Goexit() runtime.Goexit()
} else { } else {
agent.Shutdown() 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 { if !a.NoInitialSync {