(t *testing.T)
| 13 | ) |
| 14 | |
| 15 | func 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 | |
| 29 | func fillCache(cache cache.Cache) ([]string, [][]byte) { |
| 30 | // put a set of chunks, larger than background batch size, with varying timestamps and values |
nothing calls this directly
no test coverage detected