MCPcopy
hub / github.com/grpc/grpc-go / getForTesting

Method getForTesting

internal/cache/timeoutCache_test.go:41–46  ·  view source on GitHub ↗
(key any)

Source from the content-addressed store, hash-verified

39}
40
41func (c *TimeoutCache) getForTesting(key any) (*cacheEntry, bool) {
42 c.mu.Lock()
43 defer c.mu.Unlock()
44 r, ok := c.cache[key]
45 return r, ok
46}
47
48// TestCacheExpire attempts to add an entry to the cache and verifies that it
49// was added successfully. It then makes sure that on timeout, it's removed and

Callers 4

TestCacheExpireMethod · 0.95
TestCacheRemoveMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected