mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 08:35:10 +00:00
Migrate to k8s.io/utils/clock in client-go
Kubernetes-commit: bb7dac443a2039f97c822f610e78d4b65482c56d
This commit is contained in:
committed by
Kubernetes Publisher
parent
4fc3881b7f
commit
01243dd50e
5
tools/cache/expiration_cache_test.go
vendored
5
tools/cache/expiration_cache_test.go
vendored
@@ -21,9 +21,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/utils/clock"
|
||||
testingclock "k8s.io/utils/clock/testing"
|
||||
)
|
||||
|
||||
func TestTTLExpirationBasic(t *testing.T) {
|
||||
@@ -167,7 +168,7 @@ func TestTTLPolicy(t *testing.T) {
|
||||
exactlyOnTTL := fakeTime.Add(-ttl)
|
||||
expiredTime := fakeTime.Add(-(ttl + 1))
|
||||
|
||||
policy := TTLPolicy{ttl, clock.NewFakeClock(fakeTime)}
|
||||
policy := TTLPolicy{ttl, testingclock.NewFakeClock(fakeTime)}
|
||||
item := testStoreObject{id: "foo", val: "bar"}
|
||||
itemkey, _ := testStoreKeyFunc(item)
|
||||
fakeTimestampedEntry := &TimestampedEntry{Obj: item, Timestamp: exactlyOnTTL, key: itemkey}
|
||||
|
Reference in New Issue
Block a user