MCPcopy Create free account
hub / github.com/cortexproject/cortex / GetMulti

Method GetMulti

pkg/chunk/cache/memcached_test.go:84–91  ·  view source on GitHub ↗
(keys []string)

Source from the content-addressed store, hash-verified

82}
83
84func (c *mockMemcacheFailing) GetMulti(keys []string) (map[string]*memcache.Item, error) {
85 calls := c.calls.Inc()
86 if calls%3 == 0 {
87 return nil, errors.New("fail")
88 }
89
90 return c.mockMemcache.GetMulti(keys)
91}
92
93func TestMemcacheFailure(t *testing.T) {
94 t.Run("unbatched", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

GetMultiMethod · 0.65
IncMethod · 0.45

Tested by

no test coverage detected