MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / TestMemoryStorage_Locker

Function TestMemoryStorage_Locker

internal/caches/storage_memory_test.go:309–322  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

307}
308
309func TestMemoryStorage_Locker(t *testing.T) {
310 var storage = NewMemoryStorage(&serverconfigs.HTTPCachePolicy{}, nil)
311 err := storage.Init()
312 if err != nil {
313 t.Fatal(err)
314 }
315 storage.locker.Lock()
316 err = storage.deleteWithoutLocker("a")
317 storage.locker.Unlock()
318 if err != nil {
319 t.Fatal(err)
320 }
321 t.Log("ok")
322}
323
324func TestMemoryStorage_Stop(t *testing.T) {
325 var stat1 = &runtime.MemStats{}

Callers

nothing calls this directly

Calls 6

NewMemoryStorageFunction · 0.85
deleteWithoutLockerMethod · 0.80
LogMethod · 0.80
InitMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected