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

Function testCacheMultiple

pkg/cache/background_test.go:62–69  ·  view source on GitHub ↗
(t *testing.T, cache cache.Cache, keys []string, bufs [][]byte)

Source from the content-addressed store, hash-verified

60}
61
62func testCacheMultiple(t *testing.T, cache cache.Cache, keys []string, bufs [][]byte) {
63 // test getting them all
64 found, foundBufs, missingKeys := cache.Fetch(context.Background(), keys)
65 require.Len(t, found, len(keys))
66 require.Len(t, foundBufs, len(keys))
67 require.Len(t, missingKeys, 0)
68 require.Equal(t, bufs, foundBufs)
69}
70
71func testCacheMiss(t *testing.T, cache cache.Cache) {
72 for i := 0; i < 100; i++ {

Callers 1

TestBackgroundFunction · 0.85

Calls 3

FetchMethod · 0.65
LenMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected