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

Function testCacheMiss

pkg/cache/background_test.go:71–79  ·  view source on GitHub ↗
(t *testing.T, cache cache.Cache)

Source from the content-addressed store, hash-verified

69}
70
71func testCacheMiss(t *testing.T, cache cache.Cache) {
72 for i := 0; i < 100; i++ {
73 key := strconv.Itoa(rand.Int()) // arbitrary key which should fail: no chunk key is a single integer
74 found, bufs, missing := cache.Fetch(context.Background(), []string{key})
75 require.Empty(t, found)
76 require.Empty(t, bufs)
77 require.Len(t, missing, 1)
78 }
79}

Callers 1

TestBackgroundFunction · 0.85

Calls 3

IntMethod · 0.80
FetchMethod · 0.65
LenMethod · 0.65

Tested by

no test coverage detected