mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-02 07:35:21 +00:00
Store key in TimestampedEntry
Kubernetes-commit: 69fb4e960f7359641b3503b734acc32af6b05e04
This commit is contained in:
committed by
Kubernetes Publisher
parent
ba8f4e8713
commit
a865205fb0
4
tools/cache/expiration_cache_test.go
vendored
4
tools/cache/expiration_cache_test.go
vendored
@@ -168,7 +168,9 @@ func TestTTLPolicy(t *testing.T) {
|
||||
expiredTime := fakeTime.Add(-(ttl + 1))
|
||||
|
||||
policy := TTLPolicy{ttl, clock.NewFakeClock(fakeTime)}
|
||||
fakeTimestampedEntry := &TimestampedEntry{Obj: struct{}{}, Timestamp: exactlyOnTTL}
|
||||
item := testStoreObject{id: "foo", val: "bar"}
|
||||
itemkey, _ := testStoreKeyFunc(item)
|
||||
fakeTimestampedEntry := &TimestampedEntry{Obj: item, Timestamp: exactlyOnTTL, key: itemkey}
|
||||
if policy.IsExpired(fakeTimestampedEntry) {
|
||||
t.Errorf("TTL cache should not expire entries exactly on ttl")
|
||||
}
|
||||
|
Reference in New Issue
Block a user