MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / TestFileManager1

Function TestFileManager1

datafile_test.go:203–215  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

201}
202
203func TestFileManager1(t *testing.T) {
204 fm := NewFileManager(FileIO, 1024, 0.5, 256*MB)
205 filePath6 := filepath.Join(t.TempDir(), "foo2")
206 df, err := fm.GetDataFile(filePath6, entry.Size())
207 assert.Nil(t, err)
208 defer func() {
209 err = df.Release()
210 assert.Nil(t, err)
211 err = fm.Close()
212 assert.Nil(t, err)
213 _ = os.Remove(filePath)
214 }()
215}

Callers

nothing calls this directly

Calls 6

GetDataFileMethod · 0.95
CloseMethod · 0.95
NewFileManagerFunction · 0.85
SizeMethod · 0.65
ReleaseMethod · 0.65
RemoveMethod · 0.45

Tested by

no test coverage detected