diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index dd3176e9..4f70a34c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -420,207 +420,207 @@ }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/naming", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "7b3d41122501114701f8d013ea1d9533f60c5dd5" + "Rev": "4ceb6b6c5db56a2f8f454dd837c07160a3d6e131" }, { "ImportPath": "k8s.io/klog", diff --git a/tools/cache/reflector.go b/tools/cache/reflector.go index c43b7fc5..a629fd4e 100644 --- a/tools/cache/reflector.go +++ b/tools/cache/reflector.go @@ -363,7 +363,7 @@ loop: } } - watchDuration := r.clock.Now().Sub(start) + watchDuration := r.clock.Since(start) if watchDuration < 1*time.Second && eventCount == 0 { return fmt.Errorf("very short watch: %s: Unexpected watch close - watch lasted less than a second and no items received", r.name) } diff --git a/util/flowcontrol/backoff.go b/util/flowcontrol/backoff.go index b7cb70ea..39cd72f9 100644 --- a/util/flowcontrol/backoff.go +++ b/util/flowcontrol/backoff.go @@ -99,7 +99,7 @@ func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool { if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { return false } - return p.Clock.Now().Sub(eventTime) < entry.backoff + return p.Clock.Since(eventTime) < entry.backoff } // Returns True if time since lastupdate is less than the current backoff window. diff --git a/util/flowcontrol/backoff_test.go b/util/flowcontrol/backoff_test.go index b14ab341..4d061d54 100644 --- a/util/flowcontrol/backoff_test.go +++ b/util/flowcontrol/backoff_test.go @@ -114,14 +114,14 @@ func TestBackoffGC(t *testing.T) { b.GC() _, found := b.perItemBackoff[id] if !found { - t.Errorf("expected GC to skip entry, elapsed time=%s maxDuration=%s", tc.Now().Sub(lastUpdate), maxDuration) + t.Errorf("expected GC to skip entry, elapsed time=%s maxDuration=%s", tc.Since(lastUpdate), maxDuration) } tc.Step(maxDuration + step) b.GC() r, found := b.perItemBackoff[id] if found { - t.Errorf("expected GC of entry after %s got entry %v", tc.Now().Sub(lastUpdate), r) + t.Errorf("expected GC of entry after %s got entry %v", tc.Since(lastUpdate), r) } }