MCPcopy Create free account
hub / github.com/cortexproject/cortex / TestBackground

Function TestBackground

pkg/chunk/cache/background_test.go:9–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestBackground(t *testing.T) {
10 c := cache.NewBackground("mock", cache.BackgroundConfig{
11 WriteBackGoroutines: 1,
12 WriteBackBuffer: 100,
13 }, cache.NewMockCache(), nil)
14
15 keys, chunks := fillCache(t, c)
16 cache.Flush(c)
17
18 testCacheSingle(t, c, keys, chunks)
19 testCacheMultiple(t, c, keys, chunks)
20 testCacheMiss(t, c)
21}

Callers

nothing calls this directly

Calls 7

NewBackgroundFunction · 0.92
NewMockCacheFunction · 0.92
FlushFunction · 0.92
fillCacheFunction · 0.85
testCacheSingleFunction · 0.85
testCacheMultipleFunction · 0.85
testCacheMissFunction · 0.85

Tested by

no test coverage detected