github.com/sequix/cortex@v1.1.6/pkg/chunk/cache/background_test.go (about) 1 package cache_test 2 3 import ( 4 "testing" 5 6 "github.com/sequix/cortex/pkg/chunk/cache" 7 ) 8 9 func TestBackground(t *testing.T) { 10 c := cache.NewBackground("mock", cache.BackgroundConfig{ 11 WriteBackGoroutines: 1, 12 WriteBackBuffer: 100, 13 }, cache.NewMockCache()) 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 }