Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for expectNotEntry (0.1 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go

    	assertKeys(t, c.Keys(), []interface{}{})
    
    	expectNotEntry(t, c, "long-lived")
    }
    
    func TestSimpleRemoveAll(t *testing.T) {
    	c := NewLRUExpireCache(10)
    	c.Add("long-lived", "12345", 10*time.Hour)
    	c.Add("other-long-lived", "12345", 10*time.Hour)
    	c.RemoveAll(func(k any) bool {
    		return k.(string) == "long-lived"
    	})
    
    	assertKeys(t, c.Keys(), []any{"other-long-lived"})
    
    	expectNotEntry(t, c, "long-lived")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top