fix panic in e2e

pull/6/head
chenxingyu 2017-08-16 14:59:37 +08:00
parent 1d633b7fdd
commit 4e069bd90e
1 changed files with 3 additions and 1 deletions

View File

@ -518,7 +518,9 @@ func generateServicesForConfigs(configs []testutils.RunObjectConfig) []*v1.Servi
}
func sleepUpTo(d time.Duration) {
time.Sleep(time.Duration(rand.Int63n(d.Nanoseconds())))
if d.Nanoseconds() > 0 {
time.Sleep(time.Duration(rand.Int63n(d.Nanoseconds())))
}
}
func createAllResources(configs []testutils.RunObjectConfig, creatingTime time.Duration) {