We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2652d8d + 10c4ecb commit 308e8f8Copy full SHA for 308e8f8
internal/util/controller/controller_test.go
@@ -42,7 +42,10 @@ func TestReconcile(t *testing.T) {
42
43
// reconcileCache has to be created outside synctest.Test, otherwise
44
// the test would fail because of the cleanup go routine in the cache.
45
- reconcileCache := cache.New[reconcileCacheEntry](cache.DefaultTTL)
+ // Note: synctest.Test below will run with a fake clock, so it will add
46
+ // entries to the cache with a timestamp ~ 2020. We are using a high expiration
47
+ // time here so that the cache does not expire our entries during the test run.
48
+ reconcileCache := cache.New[reconcileCacheEntry](250 * 365 * 24 * time.Hour) // 250 years
49
50
synctest.Test(t, func(t *testing.T) {
51
g := NewWithT(t)
0 commit comments