Fix wait.JitterUntil

This commit is contained in:
Jordan Liggitt
2016-10-05 16:07:18 -04:00
parent 617fa91264
commit 3b5c3c286c
2 changed files with 40 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ import (
"errors"
"math/rand"
"time"
"k8s.io/kubernetes/pkg/util/runtime"
)
// For any test of the style:
@@ -81,6 +83,7 @@ func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding b
}
func() {
defer runtime.HandleCrash()
f()
}()