MCPcopy
hub / github.com/wavetermdev/waveterm / cleanupDb

Function cleanupDb

pkg/filestore/blockstore_test.go:36–51  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

34}
35
36func cleanupDb(t *testing.T) {
37 t.Logf("cleaning up db for %q", t.Name())
38 if globalDB != nil {
39 globalDB.Close()
40 globalDB = nil
41 }
42 useTestingDb = false
43 partDataSize = DefaultPartDataSize
44 WFS.clearCache()
45 if warningCount.Load() > 0 {
46 t.Errorf("warning count: %d", warningCount.Load())
47 }
48 if flushErrorCount.Load() > 0 {
49 t.Errorf("flush error count: %d", flushErrorCount.Load())
50 }
51}
52
53func (s *FileStore) getCacheSize() int {
54 s.Lock.Lock()

Callers 11

TestCreateFunction · 0.85
TestDeleteFunction · 0.85
TestSetMetaFunction · 0.85
TestWriteAtFunction · 0.85
TestAppendFunction · 0.85
TestWriteFileFunction · 0.85
TestCircularWritesFunction · 0.85
TestMultiPartFunction · 0.85
TestSimpleDBFlushFunction · 0.85
TestConcurrentAppendFunction · 0.85
TestIJsonFunction · 0.85

Calls 3

clearCacheMethod · 0.80
CloseMethod · 0.65
NameMethod · 0.45

Tested by

no test coverage detected