MCPcopy
hub / github.com/grafana/tempo / TestBackground

Function TestBackground

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

Source from the content-addressed store, hash-verified

13)
14
15func TestBackground(t *testing.T) {
16 c := cache.NewBackground("mock", cache.BackgroundConfig{
17 WriteBackGoroutines: 1,
18 WriteBackBuffer: 100,
19 }, test.NewMockClient(), nil)
20
21 keys, chunks := fillCache(c)
22 cache.Flush(c)
23
24 testCacheSingle(t, c, keys, chunks)
25 testCacheMultiple(t, c, keys, chunks)
26 testCacheMiss(t, c)
27}
28
29func fillCache(cache cache.Cache) ([]string, [][]byte) {
30 // put a set of chunks, larger than background batch size, with varying timestamps and values

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected