MCPcopy Create free account
hub / github.com/AdRoll/baker / assertKeyNotInHotCache

Function assertKeyNotInHotCache

pkg/buffercache/helper_test.go:93–103  ·  view source on GitHub ↗
(t *testing.T, cache *BufferCache, key string)

Source from the content-addressed store, hash-verified

91}
92
93func assertKeyNotInHotCache(t *testing.T, cache *BufferCache, key string) {
94 t.Helper()
95
96 loc, ok := cache.m.m[key]
97 if ok && loc.isHot() {
98 t.Errorf(`got key "%s" in hot cache, got loc=%s`, key, loc)
99 }
100 if _, ok := cache.hot.m[key]; ok {
101 t.Errorf(`key "%s" found in hot cache`, key)
102 }
103}
104
105func assertKeyInColdCache(t *testing.T, cache *BufferCache, key string) {
106 t.Helper()

Calls 1

isHotMethod · 0.80

Tested by

no test coverage detected