MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / TestCacheSerialization

Function TestCacheSerialization

pkg/util/cache/cache_test.go:1266–1273  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1264}
1265
1266func TestCacheSerialization(t *testing.T) {
1267 tc := New(DefaultExpiration, 0)
1268 testFillAndSerialize(t, tc)
1269
1270 // Check if gob.Register behaves properly even after multiple gob.Register
1271 // on c.Items (many of which will be the same type)
1272 testFillAndSerialize(t, tc)
1273}
1274
1275func testFillAndSerialize(t *testing.T, tc *Cache) {
1276 tc.Set("a", "a", DefaultExpiration)

Callers

nothing calls this directly

Calls 2

testFillAndSerializeFunction · 0.85
NewFunction · 0.70

Tested by

no test coverage detected